loading...

re: Top 10: JS Compilables VIEW POST

FULL DISCUSSION
 

Typescript seems the best , as with typescript you are extending your js knowledge and organising it , unlike other's where you are re-learning a whole new language and TS code can be easily used with any existing js project , be it server side nodejs or client side jquery and has a strong community

 

Seems the best

Have you used TypeScript on large (10,000+ LOC) projects? It works well when you don't have to use 3rd party packages (React, lodash, etc) because the run-time code for these packages is completely separate from the types. This means that close to 90% of the time, the types are wrong. Which leads to runtime exceptions becasue the typesystem is a completely inacurate representation of the runtime characteristics of the program.

Also, given that you are most likely interfacing with JS, a developer is prone to use the any type way too often, which ultimately defeats the purpose of writing typescript in the first place.


Have you considered that maybe learning a language completely different from JS might help you become a better JS developer? Haskell and Elm are good examples of this. They are radically different from JS and force you to think about your programs in a completely new way. But this thinking can be applied back to JS to help you write more resilient code.


Edit: Check out this blog post where I get into a bit of detail on TypeScript's flaws dev.to/_gdelgado/the-economics-of-...

Code of Conduct Report abuse