3 ms·
I'm a JavaScript newbie - the precise reason I choose ES2015 is because I am a newbie. A modern language has features that make things easier for newbies. Mod
by hoodoof 11y ago
I'm a JavaScript newbie - the precise reason I choose ES2015 is because I am a newbie.
A modern language has features that make things easier for newbies. Modern should equal sensible, not incomprehensible.
Consider for example the module and import system - this dramatically reduces the complexity of the overall application and allows it to be structured in a modular and well organised manner. That makes things easier, not harder and more complex.
- akamaozu 11y agoYou're new to JavaScript, but you're not new to programming. That makes all the difference in the world. Would you recommend Haskell, Erlang or arguably Go to a newbie programmer? JavaScript has the benefit of being one of the most accessible languages these days, thanks to it being available in browsers. Some people's first glimpse of production code will be from view source. The myriad of "things a real language needs" is confusing and module systems neatly package up these crucial bits of technology. Module systems are accessible to experts. Why not put enhancements there, rather than bake them into the language with no way to retract them?
- angersock 11y agoAgain, I'll fall back on C here: C is a pretty simple and easy language, and before newbies were told that they were newbies and that C was hard a lot of useful program code got written by newbies. Javascript, let's pick ES5 because it's convenient, is a generally accessible language. Like, we've built the entire modern web with it and without more fancy things, and it's been great. Modern languages don't have things that make things easier for newbies--they have things that advanced users "think" they would've found useful earlier, they have things that advanced users who need speaking and conference gigs would prefer to have to present on, they have things that runtime writers would prefer to have for their microbenchmarks, and so forth. Don't think for a second that any language features added are done for the benefit of new users. Taking your module example: look, it's braindead simple (because it's a braindead implementation, honestly) to make an ordered list of modules and includes in JS. You learn the IIFE pattern, you order your script tags, and you're done. Once you have a little more genuine size in your app, you move to preprocessing your scripts, maybe just with make and cat--I've done this, it works fine. Only later do things get really complicated. The nutziness of the current environment is that the developers are truly so fucking lazy and shinyphilic that they can't take the damned time to learn the old ways--the simple, obvious ways!--and then use them. Slow is smooth, smooth is fast.