3 ms·
TypeScript's types are way less powerful and expressive than F#'s. The comparison really doesn't fly. It's even less powerful than C#'s, and it doesn't even com
by skrebbel 12y ago
TypeScript's types are way less powerful and expressive than F#'s. The comparison really doesn't fly. It's even less powerful than C#'s, and it doesn't even come close to adequately supporting a whole range of JavaScript patterns (such as generating "classes" - constructor functions - at runtime).
My experience has become that TypeScript is really only suitable for classic OO domain programming, with many nice little classes and mutable state. I work on a project where our model layer (MVC) is made like that, and it works like a charm.
Interfacing with other libraries tends to work ok, but you'll have to forget about using --noImplicitAny (and hand in a whole bunch of safety guarantees with that). Doing non-classical-OO stuff quickly becomes a pain. I recently spent many days making a nice Om-style immutable model layer with TypeScript and Immutable.js, and it just doesn't work. The generics simply aren't powerful enough, and I spent days (and many worthless lines of code) fighting it. This saddens me.
- deleted 12y ago[deleted]