ECMAscript
This article gives a short overview about the Ecmascript history and the changes since Ecmascript 2015.
“Ecmascript sounds like a skin disease [eczema]” Brendan Eich, original developer of JavaScript
In short, EcmaScript is the specification, JavaScript is one implementation of the specification (JScript is/was another).
But let’s start from the beginning: JavaScript was developed by Netscape in 1995 to add scripting functionality to their browser Netscape Navigator 2.0. Netscape delivered the scripting language to the Ecma organization for standardization.
ECMA was the name of standards organization and stands for European Computer Manufacturers Association. The name was changed in the 90ties to Ecma after the organization has expanded it’ activity globally.
ECMAscript 1 (June 1997)
The initial standard describes the the known language features like objects, types and conversations, functions, expressions, statements, etc.
ECMAscript 2 (1998)
Editorial changes to keep the specification aligned with ISO standard 16262
ECMAscript 3 (1999)
Added Regular expressions, exception handling, improved string handling and more. Corresponds to JavaScript 1.5. Both Mozilla and Microsoft added their own extensions to ECMAScript 3.
ECMAscript 4 (Abandoned 2008)
Ecmascript 4 was the first try to rework the whole JavaScript language. It was planned to add interfaces, classes, class based inheritance and a static type system. The intention was to add a better support for large and complex projects. The version was abandoned after heated discussions between Microsoft’s platform architect for IE and Mozilla about backward incompatibility.
ECMAscript 5 (2009)
Initially Ecmascript Version 3.1,
adds a strict mode for security and error improvements:
'use strict';
getter and setter properties accessor
var obj = {
name: '',
get name() {
return this.name;
},
set name(name) {
this.name = name;
}
}
JSON Library support and new features in the standard library
JSON.parse(), JSON.stringify(), some .prototype.toJSON() methods
Ecmascript 5.1 (2011)
Editorial changes to keep the specification aligned with ISO/IEC standard 16262:2011.
ECMAScript 2015
Also called ECMAScript 6, introduced a large amount of syntax enhancements for complex applications.
- Constants
const x = 5;
- Scoping
let x = 3;
- Arrow Functions
['Hello', 'World'].map(a => console.log(a.length));
- Extended Parameter Handling
- Template Literals
- Extended Literals
- Enhanced Regular Expressions
- Enhanced Object Properties
- Destructuring Assignment
- Modules
- Classes
- Symbol Type
- Iterators
- Maps, Sets, Weak Maps, Weak Sets
- Typed Arrays
- Promises
- Proxy and Reflection
- Internationalization and Localization
ECMAScript 2016
ECMAScript 2016 adds only a small feature set:
- Math enhancements: Exponentiation operator **
let num = 3 ** 2; // Same as Math.pow(3, 2)
- Array.prototype.include
References:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Language_Resources
https://en.wikipedia.org/wiki/ECMAScript