3 ms·
I thought the point of TypeScript was to transcend certain limitations of the JavaScript language, while still being able to write for browsers. It’s a bit awk
by DrFell 6y ago
I thought the point of TypeScript was to transcend certain limitations of the JavaScript language, while still being able to write for browsers.
It’s a bit awkward, you have a transpile the script, and generate source maps to debug it, but hey, that’s life in a browser.
So if you’re not stuck in a browser, and can run any language you want, why in the world would you do all that?
- galaxyLogic 6y agoThis is not about TypeScript per se but about providing a more standards-based alternative for the Node.js JavaScript eco-system for non-browser environments.
- DrFell 6y agoI am beginning to think the JavaScript ecosystem for non-browser environments is a deepening spiral. Learning another language does require effort, but the increasingly circuitous machinations being invented to continue using browser scripting technologies outside the browser are starting to seem like even more effort. Plus, those efforts yield skills that only apply within the contrivance. A second language would apply more broadly, and probably be more edifying.
- galaxyLogic 6y agoMakes sense. But on the other hand JavaScript is currently more important than just another script-language for browsers. Browser has become the universal GUI platform. You want your application be usable over the web. So there's a lot momentum behind JavaScript, and also lot of effort to make it better.
- Nzen 6y agoPresumably, for the same reason it would be convenient for me to write in a non-javascript language for the browser: I've already invested in X lang, it would be nice not to have to keep current in two languages if someone is trying to port my vm to another platform [0]. <Edit to add> On the other hand, I'm chastened by the lifecycle of projects like Jython, that can only survive with maintainers who are well versed in two runtimes, which is apt to be a small intersection. [0] https://blog.codinghorror.com/the-principle-of-least-power/ https://blog.codinghorror.com/the-principle-of-least-power/ tl;dr A creator of node.js and others have made a new runtime and ecosystem [1] (via rust) for EcmaScript that also bundles a Typescript transpiler. Rather than utilize npm, deno dependency files call out specific uris, rather than an abstract package and assuming it is on a central server. In service of letting a user choose the sandbox boundary, the interpreter requires disabling security features (ex file IO) via the run args or a config file. [1] https://github.com/denoland https://github.com/denoland