Skip to content

re: I Chose TypeScript For the Nostalgia VIEW POST


The best reason to use TypeScript is that IDEs can actually make writing TypeScript code a decent experience, and they really can't help much with JavaScript because of the ambiguity of everything.

Just try and find an IDE that can reliably do refactoring, auto-completion, inspections, etc. on JavaScript. For TypeScript that's almost trivial. TypeScript is really the way to make JavaScript into a manageable language to write quality software in, and I will likely never touch pure JavaScript again.

I've been using JavaScript in one form or another pretty heavily for a long time, and in many ways the ecosystem is just getting worse over time as people keep adding more and more tools to make working with the garbage language bareable. It's becoming more and more difficult to set up a working tool chain to work with, and because of the complex nature and constant re-inventing the wheel with those tools everyone else's example code is never compatible with your system as it's either built for some other tool chain or it's just built for older versions of the tools.

Just as a quick example how to manage the various steps in your no doubt fairly complicated build process: npm scripts, gulp, grunt, webpack, as well as tools built into IDEs and even Makefiles are all common options

Additionally since the language itself is really not very good for almost anything, and is missing so many things that would be considered "bare basics" in any decent language, you end up with a huge amount of dependencies of varying degrees of quality and with varying degrees of care put into their design and releases. This causes your code to unexpectedly break with updates (unless you use yarn) or just have unexpected behavior or performance characteristics in general.

Since it's not really reasonable to expect all browsers to start supporting another language, what I'm really hoping for myself is that one of those languages that compile into JavaScript (e.g. Kotlin) or maybe some Emscripten -powered thing sets up a great ecosystem and takes over so we can get past this giant mess that JavaScript is right now. While that is not the case, TypeScript is definitely a step to the right direction and reduces the need for some of those tools, and makes you much more productive.

By the way, on the point of although TypeScript’s typing is more of a recommendation, you should configure your tsconfig.json to not make it a "recommendation" but to make it a requirement.

code of conduct - report abuse