4 ms·
This is why I hate ES6. JavaScript used to be a write once, run anywhere language. We sacrificed that for syntactic sugar.
by erikpukinskis 11y ago
This is why I hate ES6. JavaScript used to be a write once, run anywhere language.
We sacrificed that for syntactic sugar.
- aeharding 11y agoThen just write es5. It'll still run everywhere forever.
- deleted 11y ago[deleted]
- erikpukinskis 11y agoThat's my plan. But it means I can't use other people's modules anymore.
- mschuster91 11y agoWhy? Put a transpiler inside your build chain.
- deleted 11y ago[deleted]
- erikpukinskis 11y agoThis almost always leads to broken debugging, which I think is a bad tradeoff. Most node developers seem to not use a debugger, but I think that's a huge productivity sacrifice.
- pluma 11y agoExcept <= IE8, of course. The problem with nostalgia is that the past we so fondly remember never existed.
- maaaats 11y agoYou could write vanilla JS and your code still could fail in some versions of node because of bugs or breaking changes. And in browsers, the JS language is the same, but the implementation of the various APIs has varied greatly. So ES6 is not the problem.
- DrJokepu 11y agoJavaScript was never 'write once, run anywhere'. There were quite a few differences between the Netscape and MSIE implementations during the first few years of its existence and things didn't stabilise until the IE5 era.
- CiaranMcNulty 11y agoYeah this comment literally made me LOL; life was hard in the late 90s
- erikpukinskis 11y agoSure there are always obscure bugs, but if you stick to core JavaScript they are rare. And you can work through them. If a module is heavily using ES6 and you want to run it on an older runtime you're just toast.