Doug talks about the history of ECMAScript and recommends working in ES5/Strict. He also explains what the goals for ES5 were and how they wanted to improve the language for the users of the language.
(electronic Asian-styled music) - ECMAScript 5: The New Parts. So, complete implementations of the fifth edition are now in all the best web broswers, and also in IE10, so it's almost everywhere. So again, to review the history of the standards: the third edition was ratified in December of 1999, work on the fourth edition started almost a year before that, the fourth edition was attempting to solve some problems that I think were unnecessary and eventually it got so big and so complicated that it was not complete-able.
And that project slipped a year, per year, for 10 years. So it was eventually abandoned and instead we did the fifth edition, which started with a working title, ES3.1, indicating that it was going to be a much less ambitious attempt at adding goodness to the third edition. And it adds two languages, or it describes two languages, the default language and the strict language, and of the two, I recommend not using the default language, but using the strict language exclusively, and we'll talk later about what's in the strict language.
So, okay, well, the standard's obviously wrong, we should make the standard conform to what people actually do. We should try to make the browsers conform better to each other. There were cases where three browser-makers would do things one way, and Microsoft would do things another way. Microsoft very generously agreed to do what everybody else was doing. That was a very nice thing. In cases where all of the browsers disagreed, where every browser did something different, we took that as license to fix something deep in the standard, that we assume the Web doesn't care if every browser does something different.
We decided not to try to protect stupid people from themselves because that is just too hard. So we in fact added new ways that stupid people can do outrageously stupid things. And we'll get to that a little bit later. And we decided to have no new syntax. And the reason for that is, at the time that we were doing this work, IE6 was still the dominant browser, and our concern was that if we launched a new version of the language, and if IE6 is still dominant, and if the value the of that new language depended on its syntax, then it's going to fail.
Because every new feature means total failure, and that's not helping you at all. So we tried to add as much value to the language as we could without changing the syntax of the language. Hoping that eventually, we would solve the IE problem and then later editions of the language would be able to be freer with the syntax.
This course was created by Frontend Masters. It was originally released on 6/20/2016. We're pleased to host this training in our library.
- Writing code for performance
- Script tags
- Nodes and events
- ES5 and ES6
- Principles of security
- Object capabilities
- Synchronous functions
- Asynchronous functions