| ▲ | phplovesong 10 hours ago | ||||||||||||||||
Thats true, but comes with a cost. TS has become an incredibly complex language, even it only provides types. Thats being said is will always lack features as it only "javascript". Haxe has a more robust, but simpler typesystem, that comes from ocaml. Haxe also compiles to C++ so making native tools would have been a breeze. TS sits at the top chair, but there is many "better" options out there, like Elm (even its kild of a dead languge) and ReScript/ReasonML etc. TS is good, but will never be a perfect language for javascript. It will always be a mediocre option, that is growing more and more complex in every new release. | |||||||||||||||||
| ▲ | Tade0 8 hours ago | parent [-] | ||||||||||||||||
Yes, amazing language - I recall having a look at it in 2013 when I was scrambling for a replacement for Flash (also amazing platform). Shame it doesn't solve the problem at hand. Hardly anyone cares TypeScript isn't perfect when they can migrate their (or anyone else's) terrible, but business-critial JS library to TS and continue development without skipping a beat. For the same reason ReasonML took years to overtake fartscroll.js in the number of stars on GitHub. A huge part of TS's complexity is there so that library authors can describe some exotic behaviours seen normally only in dynamically-typed languages. When you're writing an app you don't need the vast majority of those features. Personally I regret every usage of `infer` in application code. | |||||||||||||||||
| |||||||||||||||||