4 ms·
To me, TypeScript is "perfect". Unlike other strictly typed languages (looking at you OCaml, ReasonML, Haskell), TS has never prevented me from achieving all th
by loxs 7y ago
To me, TypeScript is "perfect".
Unlike other strictly typed languages (looking at you OCaml, ReasonML, Haskell), TS has never prevented me from achieving all three of:
1) Be type safe enough to guarantee practically bug-free code (at least with regard to types, you can always have logic bugs)
2) Actually achieve what I want to do in less than a day
3) Upgrade easily when a new version of the language/tooling is released
The only thing that's missing is indeed better nominal typing so that we can more easily discriminate between logically separate instances of strings and numbers. For objects it's actually good enough to qualify for "perfect".
- IggleSniggle 7y agoTS has led me to a desire for more functionally pure typed code. I'm super interested in learning OCaml and ReasonML right now so I would be interested in understanding where you felt ReasonML falls flat vs TS.
- loxs 7y agoI definitely recommend trying them, as it will be a great learning experience. It will probably even make your TS better. What you won't be able to do is to actually ship a product easily, as the ecosystem is virtually non-existent. Documentation - virtually non-existent especially for actually creating working products. Of course, there are exceptions to this (like the Facebook Messenger being written in ReasonML), but people tend to underestimate what kind of engineering effort went into that. If you actually want to do stuff by yourself, use TS.
- spion 7y agoAnd that's the funny bit because a lot of the quirks in TS are actually bits that are needed to integrate with other imperfect tools and libraries and deliver a fully functional product.