Presentation: The Evolution of the JavaScript

Location:

Duration

Duration: 
4:10pm - 5:00pm

Day of week:

Level:

Persona:

Key Takeaways

  • Hear how the standards committee for JavaScript (TC39) has evolved the process for language features directly from one of the members.
  • Learn what’s ahead with ES2016 (such as the new async/await function).
  • Gain a better understanding on how you can begin leveraging new JavaScript features today.

Abstract

Many web developers are already familiar with the newest version of JavaScript: ES 2015 (formerly ES6). Maybe you are already using a transpiler and have gotten a glimpse of how much easier JavaScript development can be with features like arrow functions, generators, and destructuring. You may be surprised to learn that ES2015 is only the beginning. The committee is already hard at work on JavaScript ES2016, and it’s not too early to get a glimpse of some of the features being proposed.

While the latest version brought JavaScript to parity with other popular scripting languages, version 2016 will introduce powerful new features. Imagine building an entire JavaScript program without a single callback, and being able to build asynchronous programs with simple primitives like loops. Some of these features have already appeared in modern browsers, and it’s not too early to start playing with them.

Come glimpse into the future and start thinking about how to write forward compatible JavaScript applications today.

Interview

Question: 
What it is like being on TC39? For those who have never been exposed to being on a TC, can you tell us a bit about it?
Answer: 
TC39 is a really exciting experience for me because it brings together experts from a cross-section of the web stack. There are browser implementers, application framework developers, and server developers. These stakeholders bring diverse views of JavaScript to the table. Nowadays JavaScript is everywhere. It's on the server, the browser - it's even used to script native apps. Under the circumstances it's imperative we get feedback from the community on proposed features.
We have people who are experts in security. We have people who are experts in dynamic language optimization. It is incredibly rewarding as a developer to be able to get exposure to experts all these different disciplines. I love being able to pick their brains.
Question: 
Are you on hangouts or do you do calls? What does the structure look like?
Answer: 
We get together on a bi-monthly basis for about 3 days and different member organizations take turns hosting. Most recently it was at Mozilla in San Francisco. Our ranks continue to swell. I think when I started showing up, there was about 20 attendees. Now it has probably creeped up to about 30 per meeting. We meet in person every two months and that’s approximately the rate at which proposals move forward through the process. When we get together, we look at these proposals, hammer on them, look at them from different perspectives, and then decide whether or not to advance them in the process.
Question: 
Your talk is called “The Evolution of the JavaScript.” Can give us a bit detail?
Answer: 
JavaScript was in a near deep freeze for many, many years, getting no changes at all until ES5. That all changed with the release of ES2015 when we introduced some really big features in the JavaScript language.
ES2015 introduced powerful and expressive features like proxies, for example, which allows developers to mimic the browser. This allows developers to build features that we could later take and incorporate into the language or the W3C could integrate into the browser. That’s what we tried to do with ES2015, empower developers to show us how to make the web better.
After a long stagnation period, JavaScript is accelerating so rapidly now that we’ve moved to a yearly release schedule, not unlike an Agile open source software project that is doing releases on a train model. Now we are working on the ES2016 release and it’s really exciting to see how quickly we seeing new features make their way into browsers.
Question: 
Is your talk going to cover that evolution or are you going to talk about ES2016?
Answer: 
I think many JavaScript developers out there are pretty familiar with many features that are in ES2015. I will definitely cover where we came from. I will cover a bit those features and what types of problems they help JavaScript developers solve. What’s really exciting is how the new features build on top of primitives that we added in 2015. I am going to cover both ES2015 and ES2016, explaining developers what we created for them by first adding primitives and then adding syntax on top of those primitives to make the patterns that JavaScript developers use every day much easier.
Question: 
Can you give me an example of one the patterns you will cover?
Answer: 
One of the things we added in ES2015 was a new asynchronous programming primitive called Promises. A promise is an object that represents the eventual value of an asynchronous task, allowing developers build asynchronous flows in a declarative way. However, often that involves many callbacks and nesting in ES2015, and sometimes it can be difficult to see the algorithms, to see what is being done through all of that machinery, of throwing callbacks around.
What I am really excited about in ES2016 is the async/await function. These new async functions remove the boilerplate from creating asynchronous flows, allowing the algorithm to come to the foreground. It essentially allows developers to write asynchronous flows using the same control flow primitives that they have used in JavaScript, such as while loops and try-catch. That means one can write very complicated asynchronous functions without using a single callback.
Question: 
Does your talk address intermediate or advanced JavaScript developers?
Answer: 
This is a talk for any JavaScript developer. We are going to have advanced topics and we are going to have basic topics, but I think definitely anybody who codes JavaScript is going to find something in this talk. Overall, I would call it intermediate.
Question: 
What is a developer who comes to this talk going to walk away with?
Answer: 
Developers who leave this talk are going to have a much better idea of how they can leverage the upcoming features in JavaScript. Not just tomorrow but today, to build web applications that are simpler, cleaner, easier to maintain and can be developed more rapidly.
Question: 
What is your recommendation regarding transpilers?
Answer: 
My recommendation for transpilers is transpile early and transpile often. Transpilers are fantastic for developers and for us language designers. Using transpilers, developers can play around with features in a low risk way and gives us feedback. Before transpilers, we were in a very difficult position on the TC39. Have to beg browser implementers to implement experimental features so that developers could play with them.
Browser implementers didn’t really want to implement experimental features and put them out in the wild for very understandable reasons. Sometimes they would put them behind a compatibility flag so users could really opt in to using them, but, frankly, it wasn’t a very good story for browser implementers and it wasn’t a very good story for developers either, because it was a real discoverability issue. It also wasn’t very clear.
When developers were trying a new feature, it wasn’t very clear to them just how experimental or how stable a feature was. Now what changed is that the TC39 moved to a feature staging system so as a proposal moves through the stages, a developer can become more and more confident that that proposal is going to make it in some form into the final language and they can feel more and more confident about using it, even though it’s not included in the JavaScript language yet. That’s why it benefits us as language designers.
Transpiling benefits developers simply because they can begin to think in terms of the new JavaScript features. On our side, we take patterns that have proven themselves and build syntax around them to make them usable in a less prone way. When people use transpilers, which is a very low risk thing to do, they are getting those benefits today instead of having to wait for browsers to catch up.

Speaker: Jafar Husain

Tech Lead/TC-39 Representative @Netflix

Jafar Husain is the Cross-Team Technical Lead for the Netflix UI's. He is the architect of Netflix's UI data platform, and specializes in building reactive, event-driven systems. A highly-rated speaker, he has spoken at QCon, HTML Dev Conf, QCon, CodeMesh, YOW! and given Channel 9 interviews. He has also trained hundreds of developers to build event-driven systems in JS. He is the Netflix representative on the JavaScript standards committee (TC-39) and is actively working to evolve the JavaScript language.

Find Jafar Husain at

Tracks

Monday, 13 June

Tuesday, 14 June

Wednesday, 15 June