This month we all are waiting for an important event in the work of JS developers – ratification of the ECMAScript 6 specification, also known as ECMAScript 2015. June was announced as time when the JavaScript programming language will make significant update (the first update since ES5 was standardized in 2009). There is going to be a lot of additional features to the standard library, and some syntax improvements too.
Standard called ECMA-262 is the basis for JavaScript and its improving is necessary for development of the language as a whole. Though we must say that architects of this update say it is mostly about problems that developers are facing right now.
We’re asking developers about their expectations on this update. They count several big advantages:
Modules. This is definitely what the language needs. ES6 gives the syntax for defining modules and dependency declarations, which improves the interaction between different parts of code in which JavaScript can run. It eliminates the problem of the conflict of different standards and incompatible modules in the browser.
Arrow functions improvement.
Block Scopes. New let keyword, that allows to set a variable, which won’t be accessed from the rest of the code.
Classes. New classes offers syntactic sugar to determine the constructor function and prototype methods. Single format of class descriptions solves compatibility problems, whereas previously almost every library had to create classes in a different way.
Simplified syntax reduces code size, makes it faster to write: those that previously required a large amount of boilerplate code are now a part of the syntax.
Template Strings.
Well-known quote from Douglas Crockford says: “ES6 will not remove the bad parts. It will likely add more bad parts”. So, there are not only positive expectations. There are also lots of things developers won’t appreciate, and mostly they are not about innovations, but about “bad parts” that remain: all wasted and doubtful things in syntax of the language remain untouched, optional typing is missing still.
We also have to keep in mind that ratification of ES6 doesn’t mean it will be implemented soon. A lot of time (maybe, a year or two) will pass until people download and install browsers compatible with ES6. So, it is mostly a view of future opportunities for developing better software and apps. Anyway, JS developers already work with ES6 features with the help of compilers (such as Traceur or Babel).
JavaScript remains the only programming language that is used by all browsers for interaction with users and nowadays it has no alternative. That’s why, with all pluses and minuses, it needs to be improved, needs to become more standardized, needs additional features. The process goes on and while we’re waiting for ES6 ratification, the development of the next ECMAScript 7 has already begun.