Re:Why is the JavaScript ecosystem like this
by spion on Friday January 06, 2023 @03:36PM
(#34280667)
Compiling to JS doesn't solve the problem because the language (JS) isn't the problem. The problem is the browser and its inadequacy for building applications in many areas - lots of APIs that are not fit for writing applications as well as simiarly inadequate protocols.
This environment is additionally hostile to compilation - TypeScript had to bring some really amazing type system features to the table to get most engineers to reluctantly accept the headaches of compilation for the browser.
ES6 Modules, HTTP/2 and sourcemaps were supposed to fix these issues to some extent and all of them created major new headaches instead. Its like there is something fundamentally broken about the browser that we're not getting which sabotages all solutions we've come up with so far.
The JS ecosystem is the furthest ahead in making this broken environment barely usable with a bunch of hacks to compensate for its shortcomings - a new language will need to fight hard to get close.
This environment is additionally hostile to compilation - TypeScript had to bring some really amazing type system features to the table to get most engineers to reluctantly accept the headaches of compilation for the browser.
ES6 Modules, HTTP/2 and sourcemaps were supposed to fix these issues to some extent and all of them created major new headaches instead. Its like there is something fundamentally broken about the browser that we're not getting which sabotages all solutions we've come up with so far.
The JS ecosystem is the furthest ahead in making this broken environment barely usable with a bunch of hacks to compensate for its shortcomings - a new language will need to fight hard to get close.