A New Language: JavaScript

December 27, 2018

1 minute read

I was listening to a podcast yesterday, and I had an epiphany while listening:

The downside of making a language more expressive is it also makes it harder to learn. Javascript in 1996, when I learned Javascript - it had like three language features that were of any importance. If you’ve got ‘if’ and ‘for’ and ‘while’ down, you were pretty much done. That was it. That was all there was in Javascript. And now there’s like a zillion subvariants of ‘for’, and I have to google them every time… And there’s all of these syntactic sugars, and the triple dot syntax, which means one thing in one place, and a completely different thing in the other… And we’re got fat arrow functions, which have a completely different syntactic binding for this than an ordinary function… All of these little things, which we were like “We added this because it was really convenient and it solved a problem” - they are creating a barrier to newbies. They’re like “I wrote a function that was one function, and then I changed the function format to another function, and suddenly my code is broken.” That’s really confusing for somebody just arriving in the language. So expressiveness is good, but it’s not without downsides.

- Laurie Voss, COO, npm Inc. on Episode #55, JS Party

This is why I've struggled so much with learing the new JavaScript! The version I learned in the late 90s was a completely different language. So many expressive patterns and features have been added to JavaScript that it's literally a new language.

Thank you Laurie for your clear observations, providing me an epiphany on my own personal journey with code. I recommend you listen to this episode, because it's full of wisdom and insight.