I tend to have funny philosophical conversations. Sometimes I argue with my colleagues on whether we should push E2E or unit tests, or even further, what is a unit. One day, I suddenly asked:
Sure, it is a programming language. But how does it relate to ECMAScript? Is it the same as ECMAScript? If so, why do we have two terms for the same thing? If they are different, then what is the difference?
The Chicken Was Born Before The Egg
"ECMAScript was always an unwanted trade name that sounds like a skin disease."
ECMAScript (also known as ECMA-262) is a programming language specification maintained by the organization ECMA International. Since 2015, it releases a new version every year. Arguably the most famous of them is the 2015 increment (ES2015, or ES6), which brought many long-awaited features to the table including classes, arrow functions, and promises. A language specification gives detailed instructions on what to do on different inputs, very often with pseudo-code included.
This is the most accurate definition I could come up with. A dialect refers to slight changes and extensions of a certain language. Sometimes engines implement language features that are still in the Proposal phase of the standardization process.
Let's take the proposal for public and private instance fields. In the time of writing, this is not yet part of ECMAScript. If V8 (Chrome, Node.js engine) decides to implement it today, it extends ECMAScript, making its interpreted language a dialect of it. What if SpiderMonkey (Firefox) doesn't implement this, instead they decide on adding another experimental feature? Technically, we are talking of two different dialects of ECMAScript. This is the point where it all gets too impractical.
Subscribe to our email newsletter and unlock access to members-only content and exclusive updates.