What is ECMAScript?

What is ECMAScript? What’s new in ES 2018? | JavaScript

If you are a developer or even a technology enthusiast, you would definitely have come across the terms ECMAScript, JavaScript, etc. And unless you have been in the industry for decades, you must have at least once, taken a step back to understand what exactly these are and how one relates to the other. Before you attempt to understand the specifications, it is important that you understand what a scripting language is, because, at the end of the day, that is what ECMAScript and JavaScript revolve around. To put it simply, a scripting language is an important element of software development. It primarily decides how a particular webpage will behave and interact with the user. Now that you are clear on what a scripting language is, we can move on to detailing. Let us begin by deconstructing ECMAScript.

What is ECMAScript?

ECMAScript is a standard script language that seeks to bring about consistency amongst different scripting languages. It derives its name from the European Computers Manufacturers Association (ECMA) where it was developed for the first time as ECMA- 262. Since then, it has been evolving, providing the developers with new features on the go to augment the user experience. For the ones just entering programming, ECMA- 262 acts as a standard containing the specifications that a general purpose scripting language must adhere to. The ECMAScript defines a list of rules and guidelines that make any scripting language ECMAScript compliant. The standardization by ECMAScript has facilitated the possibility of multiple independent implementations. The ECMAScript was developed by a collaboration of major originating scripting languages, most importantly between JavaScript from Netscape and JScript from Microsoft. As a product of collaboration, it is best able to illustrate a standardized platform to ensure consistency.

ECMAScript and JavaScript

As mentioned, the development of a standard script language in the form of ECMAScript was an attempt to facilitate multiple independent implementations. JavaScript stands as the most promising implementation amongst the lot. It is more or less completely based upon the ECMAScript specifications. While two other implementations are on the playing field, including JScript and ActionScript, JavaScript tends to stand out in most cases. Adopting the core functionalities from its parent language, JavaScript has some additional features and specifications that act as distinctive points for its popularity. For those, who are still confused whether to learn JavaScript or ECMAScript, just remember when you learn the former, you automatically get versed in the latter. You might want to understand it this way, ‘ECMAScript is the language, and JavaScript is the dialect.’

Journey of ES

ES6 JavaScript

ES6 or the ECMAScript 6 that released in 2017 brought in some most advanced features to make a coder’s job easy. Most of its advances aimed to make the code more readable and reduce the burden on programmers by allowing them to code less and do more. Some of them deserve a special mention, as they went a step ahead in making coding fun and convenient. The introduction of const and let revolutionized the variable world. While both were blocked- scope, const acted as an immutable variable and let as a mutable one. The addition of arrow functions gave the code a new modern look making it more readable. Classes was another such advance that seeks to make a code more secure and encapsulated, giving an altogether fresh structure to it. Other additions included better templates, default parameters, modules and more.

ES7 JavaScript

Undoubtedly ES6 brought some drastic additions to its framework. It was then decided that a new version of ECMAScript would be released on an annual basis, which meant that not every version would have revolutionary changes. In the same light, ES7, that rolled out in 2016 focused on only 2 highlights- Array.prototype.includes() and Exponentiation operator. The former is an attempt to check the array for the value passed as an argument. What is common between both the highlights is the fact that ES7 did not focus on bringing about something new to the table, rather it sought to refine the existing functionalities by presenting alternatives.

ES8 JavaScript

ES8 rolled out in 2017 and was again home to a variety of new features and upgrades. The first feature that deserves attention is the string padding that pads a string at the start (padStart) and end (padEnd) to ensure that the string reaches the given length. Trailing commas in function parameter lists and calls serve as another mechanism for making coding convenient. As an ability of the compiler, it prevents the raising of an error on the addition of an unnecessary comma. Plenty of other additions also came along with this new version.

What’s new in ES 2018

The latest version of ECMAScript comes out as ES9. The features to be rolled with this version were decided in the TC39 Meeting and were implemented subsequently. If you are as excited as us about the new features, we won’t keep you waiting-

Asynchronous Iteration

Definitely, the top in every list labelling the new in ES2018 is the asynchronous iteration. This feature brings along asynchronous iterators and iterables. What this makes possible is a for- wait- of iteration statement to create asynchronous generator functions and methods.

RegExp

RegExp has come in ES 2018 in a total of 4 feature sets. First, s (dotAll) flag for regular expressions seeks to ensure consistent behaviour. Second, RegExp named capture groups to assist in the identification of capture groups to ensure that RegExp is easier to understand. Third, RegExp Lookbehind Assertions are zero width assertions that match a string without any consumption to fix a shortcoming. Fourth RegExp Unicode Property Escapes provides programmers with a more effective way to access Unicode character properties.

Promise.prototype.finally()

Another sought after feature addition to ES 2018, the Promise.prototype.finally() is making quite the mark. This functionality allows the programmers to register a call back to be invoked when a promise is settled. Invariably it finalizes the whole promises implementation.

Template Literals Tweak

One of the final, what’s new in ES 2018 is the template literals tweak. This was something that most developers were looking forward to. Simply put, this has brought about an elimination of all syntactic restrictions related to escape sequences in template literals.

In conclusion, it is a unanimous agreement among more developers that ES 2018 is something that they had been looking forward to. It not only promised some real upgrades and improvements to the existing functionalities, but also some major additions. The improvements and additions together have made this version a delight for most developers to work with. The ECMAScript legacy of rolling out a new version every year is definitely a boon to many. Undoubtedly, It brings along advancements that make coding modern, structured and something that programmers can look forward to.

This may be it for what’s new in ES 2018. But aren’t you already looking forward to the next version in the coming year, ES 2019? Why not make a list of what features you would like to see and then compare how close was your speculation to the real thing?

About RECRO

At Recro we combine Design Thinking, Lean and Agile to help you achieve market-leading  performance.

We partner with our clients with the aim to transform their business challenges into growth opportunities.

Pages

Categories

Subscribe



7869