I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.
I suspect that if some accidents of history hadn't left JS as the only language you can use to script a Web browser, it would have died off long ago.
The JavaScript ecosystem is delightfully weird
11–20 of 248 posts
Re: The JavaScript ecosystem is delightfully weird
#12I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.
Re: The JavaScript ecosystem is delightfully weird
#13Eh, deliberately repurposes. I don’t think “misuses” is the right word at all.
> abuse of the bundler
This also feels too strong a wording—though the fact that these are at least .js files (unlike .svelte files in the other case) makes the term “abuse” less unreasonable.
Re: The JavaScript ecosystem is delightfully weird
#14This is how "delightful" it is, and is the reason I'm waiting for it to die.
Every couple of years we decide on the 'no no, definitely this time we have it all figured out, trust us, just use X' "solution" to the problem of JavaScript. We have the definative 'this is how you do it', until the next one.
Re: The JavaScript ecosystem is delightfully weird
#15Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…
I’m not altogether against giving it a different name. It’s very limited compared to what proper ahead-of-time compilers manage. I’d really like to see some actual effort put into partial evaluation and symbolic-execution-guided code simplification and dead code removal. Google tried something a little like it in Closure Compiler’s advanced optimisations mode, many years ago, but hasn’t really kept it up; and Facebook tried some five years ago with Prepack, but quickly gave up on it for unclear reasons.
Re: The JavaScript ecosystem is delightfully weird
#16I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.
How is it a better codegen target than any other language? That's not intended with an argumentative tone- I'm genuinely curious as to what you mean.
Re: The JavaScript ecosystem is delightfully weird
#17So JS is delightful because we are still not actually writing JS, but stuff that looks like JS? Huh.
It's weird how JS is the only ecosystem entirely designed around the premise of avoiding direct contact with the language you're developing in at all costs. Like, even C programmers are willing to actually write C.
Re: The JavaScript ecosystem is delightfully weird
#18Re: The JavaScript ecosystem is delightfully weird
#19I wonder how much of this can be blamed on JS being a relatively gentle and forgiving codegen target.
I suspect that if some accidents of history hadn't left JS as the only language you can use to script a Web browser, it would have died off long ago.
Re: The JavaScript ecosystem is delightfully weird
#20Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…
> "tree shaking" (the JS ecosystem's way of spelling "dead code removal") I’m not altogether against giving it a different name. It’s very limited compared to what proper ahead-of-time compilers manage. I’d really like to see some actual effort put into partial evaluation and symbolic-execution-guided code simplification and dead code removal. Google tried something a little like it in Closure Compiler’s advanced opt…