4 ms·
> tl;dr: use Babel to get default arguments that are both more readable and more robust, along with a bunch of other JS Harmony improvements, for free. You mea
by aikah 11y ago
> tl;dr: use Babel to get default arguments that are both more readable and more robust, along with a bunch of other JS Harmony improvements, for free.
You mean replace perfectly valid javascript with a complicated nodejs pipeline in order to make scripts run in the browser now? hell no.
- tracker1 11y agoI like babel for plenty of other reasons... the single biggest one is the culmination of Promise + coroutines with async/await keywords. Not to mention being able to break code into discrete modules that can be utilized without having to jump through namespace hoops or global collisions (does $ mean jQuery, Prototype, document.querySelectorAll, ...).
- bsimpson 11y agoYou can easily get Babel, proper modules, hot module replacement, and a bunch of other goodies with Webpack. I wouldn't start a new JS project without it.
- matwood 11y ago> complicated nodejs pipeline in order to make scripts run in the browser now? Huh? Babel plugs into whatever build pipeline you already have be it webpack, gulp, etc... You also get the benefits of being able to use ES6 today which has tons of great features.
- lewisl9029 11y agoWhile I appreciate simplicity as much as the next guy, using this "complicated nodejs pipeline" gives you access to a wide array of language features that can make your entire codebase simpler. I feel this is an excellent trade-off for any non-trivial project.