4 ms·
> Using let instead of var still breaks a few browsers. I want to move to modern javascript without the babel requirement It seems unreasonable to me to expect
by allover 9y ago
> Using let instead of var still breaks a few browsers. I want to move to modern javascript without the babel requirement
It seems unreasonable to me to expect to run new language features on old runtimes, do you have a good reason to not use Babel and move on? I've been writing ES6 (with Babel) from > 2 years now and have never regretted the move.
- wavefunction 9y agoI think they mean they use var instead of let as var is fully supported by all JavaScript capable browsers.
- Rumudiez 9y agoAnd I think allover’s point was that doesn’t matter if you use Babel to transpile back to ES5. Personally, I would never go back now that I’ve been writing ES6 in production for almost two years
- wavefunction 9y agoES5 doesn't cover all browsers, which is again I believe OP's point. https://babeljs.io/docs/usage/caveats/ https://babeljs.io/docs/usage/caveats/
- veeti 9y agoNo, but as your link mentions you can add a polyfill to cover those gaps instead of letting IE9 dictate what you can and can't do.
- pluma 9y agoNot using tooling also means no module system and no dependency management. Which likely also means no unit tests. And no minification. No linting or type checking. No third party code except maybe a few bundles you downloaded once and will never update that barf all over the global scope. I get the appeal of partying like it's 1999 but as someone who used JS in the 1990s these are things I would not want to live without. I'm perfectly capable of writing ES3 code without any tooling but I'd rather not.
- dclowd9901 9y agoIndeed. We have to now think of JS dev for the web as something like a Universal build and dispense with trying to code for the oldest version. I know JS is JIT, but with tools like Babel and webpack and sourcemapping, that doesn’t mean we have to write the same code that’s executed. New code is so much more resilient. Remember: this is what we evolved to.