News for hackers. Stuff that matters.
Re:How to Write CSS That Works in Every Browser, Even the Ol... by allover on Thursday March 08, 2018 @07:21PM (#16548883)
> 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.

Re:How to Write CSS That Works in Every Browser, Even the Ol... by dclowd9901 on Friday March 09, 2018 @12:31AM (#16549985)
Indeed. 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.

Re:How to Write CSS That Works in Every Browser, Even the Ol... by wavefunction on Thursday March 08, 2018 @08:37PM (#16549243)
I think they mean they use var instead of let as var is fully supported by all JavaScript capable browsers.
Re:How to Write CSS That Works in Every Browser, Even the Ol... by Rumudiez on Thursday March 08, 2018 @08:48PM (#16549285)
And 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
Re:How to Write CSS That Works in Every Browser, Even the Ol... by wavefunction on Thursday March 08, 2018 @09:27PM (#16549418)
ES5 doesn't cover all browsers, which is again I believe OP's point.

https://babeljs.io/docs/usage/caveats/

Re:How to Write CSS That Works in Every Browser, Even the Ol... by veeti on Friday March 09, 2018 @03:34AM (#16550504)
No, 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.
Re:How to Write CSS That Works in Every Browser, Even the Ol... by pluma on Friday March 09, 2018 @04:27AM (#16550648)
Not 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.