Check out a free preview of the full JavaScript: The Recent Parts course

The "JavaScript New Feature Process" Lesson is part of the full, JavaScript: The Recent Parts course featured in this preview video. Here's what you'd learn in this lesson:

Kyle Simpson begins by giving context to the frustration with the fast pace of JavaScript's evolution by talking about the dark ages of JavaScript, and explaining how the language has gotten to the present day feature process.

Preview
Close

Transcript from the "JavaScript New Feature Process" Lesson

[00:00:00]
>> Kyle Simpson: Welcome everyone to JavaScript the recent parts. We have looked in other courses here on Frontend Masters at the deeper prospectives on JavaScript, the deep core foundations. But it is quite easy to focus on those parts and then feel like JavaScript is leaving you behind. And some of you have heard this term before, JavaScript fatigue, feeling like my goodness, this language is changing so fast, it seems like every few months there's a whole new blog post about a whole new feature and how I can possibly keep up?

[00:00:33]
And some people have gone to the extreme here and almost rebuild against any sort of keeping up with JavaScript like JavaScript changing too fast. Some people have proposed that JavaScript should stop like a moratorium on new features for some period of time, so there's varying degrees of reaction to this quick pace.

[00:00:56]
So just a quick bit of contextual history here, JavaScript for a long period of time went through what we would disaffectionately refer to as the dark ages. That was the period of time between ES3 and ES5 and that was actually a full decade. From 1999 to 2009, essentially nothing happened in the JavaScript language.

[00:01:18]
And during that same period of time, a lot of things happened in the broader web ecosystem where, for example, Internet Explorer 6 had come out and then stagnated for more than 5 years. No updates, no changes to the web platform. And many people became very frustrated and started up whole new browsers.

[00:01:39]
I mean, we have Mozilla and Chrome and all these because of this stagnation in the web that coincided with or fell in the middle of the stagnation of JavaScript, the language. Now the reason for that stagnation was actually a lot of political infighting. They were trying to work on the ES4 spec and they were divisions and they couldn't figure it out and they basically just departed.

[00:02:01]
They went back to their neutral sites and didn't make any updates because they couldn't agree. And then they came back together finally in 2009, and they said we're not gonna have any of these big factions or disagreements. We're gonna have this one JavaScript policy which is everybody agrees that we don't put something in the spec unless we all agree that it's gonna be faithfully implemented.

[00:02:23]
And by that point there were a lot more stakeholders, a lot more browsers both mobile and desktop, or even starting to get stakeholders that are not browsers at all. Other environments like Node.js and things like that. And so, they had a lot more people at the table at that point, they said the best thing for JavaScript is that JavaScript is one JavaScript.

[00:02:42]
That there isn't this case like we had in the IE6 days. Where there's the different JavaScript running in the IE browser than is running for example in a Mozilla browser. So they said no more of that, we have to agree that there's one JavaScript. And this was a tremendously important inflection point for the history of JavaScript.

[00:03:00]
And its signaled since we've got our process back together, we figured out the kinks, if you will, and now we have people agreeing to work towards progress. So it's seem very hopeful like year five is the signal the JavaScript is gonna restart the wheels and move forward. And then 2010 and 2011 and 12 and 13 have gone by and here we are 3 or 4 years.

[00:03:25]
And nothing has changed about JavaScript again. No that they are doing work, they were doing lots of work but they were discussing vehemently disagreeing and trying to work out the issues for all of those things that were actually the problems with ES4. So they were revisiting these issues and saying, these are all still things that we wanna do with the language.

[00:03:48]
We wanna move the language forward to be a full class programming language and there a lot of features that we wanna add to language to do that. So that it can be seen as equal to any of other major programming languages. And so, there was a lot of disagreement about each individual feature and it took months and sometimes years for them to work out these differences.

[00:04:09]
But the end result was that we didn't get an ES6 or ES2015, we didn't get that land until late 2015. So 2009 to 2015, we have 2009 to 2015 of 6 years. We had a decade of no change, and then six years since Java Script had been updated.

[00:04:34]
And at that point when they landed ES6, and they had all these changes, and boy there was a lot of changes. Something like over 300 new features or tweaks from small things to giant whole new features, like modules and classes. Major stuff and even tiny little helper APIs and little syntax and stuff like that.

[00:04:56]
So it's this big, big change that felt like it had been pending not for 6 years but for 16 years. There's this frustration like we've gotta force all of this stuff into the language. And naturally, there was a bunch of blow back. Like you just completely changed the entire language and now every blog post that I read I can't even understand what they're writing cuz there's all these like arrow symbols all over the place and dots dots everywhere.

[00:05:22]
And I don't even know what this JavaScript is people say, this is not the JavaScript I grew up with, right? And so there was this push back that said well, how do we get a process where JavaScript can evolve, that it doesn't stagnate, that we don't wait for ten or even six years to get features?

[00:05:39]
But we also don't show up with this massive load that we just dump on people and then nobody can process it and even to this day four years later, people are still reeling from the change set of ES6. And so in that ES6 process they also voted to say the healthiest thing for our language is not to stagnate.

[00:06:02]
It's also not to collect things up into some symbolic thing like, this is version six of the language, and this version seven of the language. But rather they felt like the healthiest thing for JavaScript is to move forward little by little. Incrementally, like a train leaving the station every 15 minutes, on time, every year, the JavaScript spec is gonna come out.

[00:06:23]
And they reflected that even in the naming. They changed officially the name of the language. So when the update to JavaScript came in 2016, that wasn't ES7, that was ES2016. And then another update came in 2017 and 2018, and even just within the last few weeks, we got an official update called ES2019.

[00:06:48]
Now, just as a little bit of nuance there, they vote in the early part of the year, and then by mid year, it's officially ratified by ECMA, the organization that manages standards. So we at the current moment of this course or in-between, we have voted on what those specs are, but they have to be officially ratified.

[00:07:09]
That's essentially a rubber stamp at this point, so we know what ES2019 is gonna look like. And they're already talking about things that are gonna happen in ES2020 and in 2021. Nobody knows when a feature is gonna land until it reaches the final stage. There are 5 stages of the TC39 proposal process from 0 to 4, and stage 4 means done, finished, shipped, it's complete.

[00:07:36]
So anything that makes stage four by that earlier vote, January or February of a year, anything that has reached the stage four by the end of that meeting is in for that year. And if it's on stage three or before it's not in, but it'll still be on the next train or the next train or the next train.

[00:07:55]
So they setup this process and said, let's keep proposals moving independently rather than having to keep everything in a gate. And let these proposals move as quickly or as slowly as is appropriate. Because some features we know pretty well, it's a small define surface area let's just move forward with it and some things are huge and it may take years for us to figure out.

[00:08:18]
And one of the big challenges with JavaScript, backwards compatibility means once something is in it's in, right? We don't back stuff out of the language because then we could break websites. So there's a tremendous pressure and responsibility that when something goes in that it's really ready. That it's been documented, that it's been researched, that it's been tested, that it's been implemented multiple times, so that we know the engines can do it.

[00:08:46]
So they put in all of this structure and process to say, let's get on a better train, where every year are continually evolving the language. And that's where our status quo is today, that each year we see a variety of different features from tiny little tweaks, like in ES2019 they made some very nuanced tweaks to jsons.stringify.

[00:09:10]
The way it handles Unicode character encoding, not something that is probably pressing on most developers minds, but important nonetheless. And then we have big features which one of them will talk about, like flat mapping, that's a big feature especially if your functional programmer. You love having the ability to do flat mapping, and so we get API then we get tiny little tweaks and everything in between.

[00:09:34]
And so we're hoping that we never see either of the two things that have happened over the last 16 years. We're hoping that we never see a long period of time of nothing happening. And we're also hoping that we never see a year show up where just everything dumps on everyone and we're overwhelmed.

[00:09:52]
So that fatigue that people are feeling is understandable. But in a sense, the alternatives are much worse for our industry. The alternative is that if JavaScript stopped evolving to give everybody time to catch up, then JavaScript's gonna get surpassed by something else. We already seen in a sense existential threats to JavaScript as an authoring language when we think about things like Web Assembly.

[00:10:20]
More and more people are saying well, I don't even need to write that in JavaScript, I can write it in Go or Rust or some other language and just go write to the browser and skip the JavaScript language entirely. So if JavaScript the language wants to continue to be a vital part of the web, it has to continue to evolve.

[00:10:37]
I don't subscribe to the belief that we are approaching some final end point for JavaScript. It's gonna continue to evolve, we may not be adding huge new features every single year. We may be slowing down on the big changes. But then again, we might be adding huge changes like someday we may be talking about adding static types to JavaScript, or we may be talking about adding macros to JavaScript.

[00:11:03]
There are a number of features that I'm very hopeful for like pattern matching, and the optional chaining operators so that you don't have to check for undefined at each level of a property access. Those are great features, they are in various stages and moving their way towards getting on the train.

[00:11:21]
So those things will continue to happen for the language.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now