This course has been updated! We now recommend you take the ES6: The Right Parts course.
Transcript from the "The Future" Lesson
>> Aaron Frost: I wanna talk about some of the goals of the TC39, cuz they're the ones steering the ship that we've all decided to be on. So they want Java to be a better language. They've got three, among other goals, three big ones. They want it to be possible to write complex applications with it.
[00:00:20] And they want it to be a great language for writing libraries in. And they want it to be great for code generators. They want it to be a solid compile to language. Something that you can compile into and do that effectively. They also want a testable specification and you guys will see today they are adopting de facto standards.
[00:01:05] So, if you go to esdiscuss.org/notes, you can see all the notes from their meetings they have once a month. And they do them in different places every time. And then a lot of times, like when you're talking about ES6, people are like, dude, that's in ES.Next or JS.Next or that's in ES6 or Harmony.
[00:01:25] Like, they use these three words interchangeably. They don't mean the same thing, like, they mean different things. So I wanted to kind of talk about what it is that they mean. So in harmony this is like, so we've got the current releases over here. This is like the ES3 features, the ES5 features, and the ES5.1 features.
[00:01:46] These are already shipped in production and packaged and released, right? And then you got this whole other bucket. And these are all features from the future go here, okay. So this big bucket where all the future features are at, that's called Harmony, okay? And then there's this spot in the bucket which is like the pointer to the next release, okay.
[00:02:10] And this is called ES.NET, right. And currently there's a release in that spot and it's ES6. So ES6 is currently sitting in the next seat but we're about to ship that, right. So once that ships, ES6 is gonna go over to the shipped package, the one of these shipped releases and ES7 is gonna drop into the ES.NEXT spot.
[00:02:32] So ES.NEXT is a pointer to whatever the next release is that they're currently working on. Harmony is all the stuff, whether it's gonna be included or not. Like we've all heard a Harmony feature called object.observe, right. That's not ES6, that's ES7. So there are features that are currently under development that are in ES6.
[00:02:55] So, does anyone have any questions about like those three buckets or anything about like the history that we just talked about? Because that was our history lesson for the day. So I see a question here. Can you tell us more about Straw Man? And so straw man, I'm gonna just pull up the spec real quick.
[00:03:18] One second. These proposals, okay. So this page right here is the harmony proposals. We talked about Harmony being this big bucket, this big idea. So on this proposal's list. You've kind of got all the features that they wanna drop into the language. And some of them we're gonna see and some of them have been pushed, I got here, remember we talked about object.observe.
[00:03:47] So like that's kinda down here at the bottom. Can everyone see that, sorry that's kinda small. I'm gonna make it bigger. So we've got object.observe down here on the bottom. And we've got a bunch of other features, like let's find. So like generators. Who's excited for generators? On the survey, we said a lot of people were like, yeah generators.
[00:04:07] So like generator expressions were supposed to be in, they got pushed. It's still being hashed out. So these straw man proposals are kind of like, they're kinda like a puppet version of this idea that they wanna implement. They don't have any implementation ideas or [INAUDIBLE] of how they all work but it is an idea of how it should work.
[00:04:29] So do you guys have any questions about, hey, what are they strawmanning, what are they currently thinking about doing in the next version, this is a place where you could come to to find that out. But also if you go to ES discuss and you go to the notes.
[00:04:45] This notes page would also show you what they're talking about. So they met three days in July. If you wanted to see those notes from the 31st, you come in here and you can kind of see who's talking what, who's saying what. And you can kind of see who the players are.
[00:05:04] So Alan Wasbrack, we've got Jeff Morison, we've got Voodoo Kats, Sebastian Markets. So, you can kind of see who the players are and who's getting involved in what features. If you wanna stay up to date on the stuff. You can also follow ES Discuss on Twitter. I think it's Jason Orndorff who runs the Twitter account and he kind of posts 140 character gems about what they talk about so.
[00:05:34] Anyway, that's another thing. And if you follow the Twitter handle, you'll also be able to see when they post new notes. When the notes gets uploaded, they'll tweet it out. How that answered the guy who wants to know about straw man? So, we've got a question, how do some proposals move to ES7 from ES6?
[00:05:55] So I'll give you the idea, and then I'll show an example. So, they've eventually gotta ship software. Some of us know, we have been at work where, we don't release, we don't release, because we're trying to make something perfect and we wanna rewrite it and revamp it. But eventually, you gotta cut or release, right?
[00:06:13] So ES6 is gotta be cut eventually like if they sit here and rev on classes until everyone agrees, they will never release classes. Because not everyone is gonna agree ever on that one specifically. And so, when they get to a point where we're not agreeing on it, it gets pushed.
[00:06:30] And they do that, that's kind of like where everyone has to accept it. If we can't agree on it, it's not going in and everyone is gonna have to embrace that. If the whole community doesn't agree with you, you can't be really emotional that everyone else doesn't defend your point of view.
[00:06:44] That's just how it is. So let me give you an example classes and we will talk about this later. But if you go down to the very bottom of this class [INAUDIBLE] up a little bit. You see this right here. This is intended as a closed-ended proposal and is not open for major feature additions.
[00:07:11] So the name of this page is maximally minimal classes. So it's not classes, this is what we could do to get it out. And if you read this, it says future edition of x or episodic ECMAScript may and probably will extend this definition. However, for the intend of ES6, is only to include the features described in this proposal.
[00:07:33] Attempting to extend this proposal is likely to result in deadlock that would result in the inclusion of no class definition support in ES6. So eventually, if no one can agree on your stuff, you are gonna get bumped to the next release. So if you really, really care about it, you've either got to get ready to compromise or you gotta get ready to push you to the next release.
[00:07:53] And so, that's kind of how things get moved out. So anything that you saw moved out, obviously something you really cared about, like array comprehensions. Some people write arrays comprehensions, they got pushed because they couldn't agree on that. Maybe it was the syntax, maybe some people wanted a more powerful, maybe some people wanted different syntax around it but for whatever reason things are getting pushed when the strawman proposals can get accepted fast enough.
>> Speaker 2: One thing I think somebody mentions on slide 31 and 34, the groupings were just backwards.
[00:08:45] Can you just maybe make know that? I think [INAUDIBLE].
>> Speaker 3: Like Microsoft, Yahoo.
>> Aaron Frost: Did I put them on the wrong side?
>> Speaker 3: Basically, your slides on one thing but then on your graphic.
>> Aaron Frost: It was the opposite?
>> Speaker 3: Yeah, it was the opposite. So your slides are real-
>> Aaron Frost: Slides are the real thing.
>> Speaker 3: Okay, so-
>> Aaron Frost: Not the graphic.
>> Speaker 3: The graphic, yeah okay.
>> Aaron Frost: Yeah, sorry guys didn't mean to confuse anyone. Hopefully everyone's- [CROSSTALK] So I'm gonna talk about these features today. These are what we're gonna learn. Some of these, I could do an hour and a half two hours on each.
[00:09:22] We don't have that kind of time today. So, on some of them where you guys were like, dude go all the way deep man, go, do more of that. It was like I'm not gonna do everything about all of it because we don't have enough time. And it's a thing that we could spend a week on if we were seriously like, let's talk about all the intricacies and the nuances of every new feature, it would take us a really, really long time.
[00:09:45] So I've picked these ones out and this is what we're gonna talk about today.