4 ms·
I never stopped. For that matter I never stopped writing javascript the same way. Using let instead of var still breaks a few browsers. I want to move to mod
by wolco 9y ago
I never stopped. For that matter I never stopped writing javascript the same way. Using let instead of var still breaks a few browsers. I want to move to modern javascript without the babel requirement some older browsers are not ready yet. I would like to but prefer no production bugs.
- dvddgld 9y agoWhich browsers does let break?
- wolco 9y agosafari and older ie versions. 10 for sure. Remember when console.log broke ie? Debugging was fun.
- neonhomer 9y agoIt was terrible when the only thing you could do was alert your variables!
- geocar 9y agoBack in the day I used LiveConnect[1] for this and other purposes[2]. I would dump errors to an IRC server so that I could collect the results. I could also respond with code that would be eval'd making development very easy. [1]: https://developer.mozilla.org/en-US/docs/Archive/Web/LiveConnect https://developer.mozilla.org/en-US/docs/Archive/Web/LiveCon... [2]: http://geocar.sdf1.org/ajaj.html http://geocar.sdf1.org/ajaj.html
- tonyarkles 9y ago> I could also respond with code that would be eval'd making development very easy In dev only, I hope?! I honestly love the idea as a super fun hack, but the security implications for prod are terrifying.
- geocar 9y agoNot sure there was much risk: The web application used a private IRC server with name+password registered users. L3 support who /msg'd a user session some JavaScript doesn't seem likely as the messages were all logged, and anyone with fileserver access could just put whatever they want in the <script> tag anyway...
- pluma 9y agoRemember when console.log was available when the dev tools were open but would be undefined otherwise, so your code would break unexpectedly but then work fine when you tried to figure out what went wrong?
- laxd 9y agoOh gaahd, It's all coming back to me now. function log(msg) { if (console.log) console.log(msg) }
- comex 9y agoIt doesn’t break Safari.
- wolco 9y agoversion 9 and below it breaks
- Yaggo 9y ago> safari and older ie versions. 10 for sure. This is false information about Safari. In fact, Safari was the first browser to implement 100% ES2015 support. https://developer.apple.com/safari/technology-preview/release-notes/#r8 https://developer.apple.com/safari/technology-preview/releas...
- 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.