weekly insights into the trends in web development

DevTrends #43

ECMAScript 2019 and the future of JS

February 21, 2019



ECMAScript 2019: the final feature set

JavaScript is constantly evolving, and there’s been pretty of versions since first release of modern JavaScript, and by “modern” I mean ECMAScript 6 or, more accurately, ECMAScript 2015. It gave us many and many useful features which facilitated our day-to-day usage of the language. Some of the features came via natural evolution of JavaScript, some have been taken from other programming languages and others were brought by CoffeeScript. But more important that the release of ES 6 divided whole JavaScript language into the period of before and after. It was really prominent release which changed the way we use JS.

Since then, weight and importance of ECMAScript versions has decreased to a great extent. Nowadays, yearly releases mostly include minor language additions and internal improvements. ES2019 is no different, but still let’s see what it brings.
For this, let’s check this article by Axel Rauschmayer, which is prominent JavaSCript specialist that does trainings and writes great books like Exploring ES and JavaScript for impatient programmers. Two main features of ES2019 are flat and flatMap methods for arrays and Object.fromEntries.
array flat is like flatten in lodash
flatMap is like map function followed by flat
Object.fromEntries is opposite of Object.entries

Other ES2019 features include trimming a string from start or end, getter for Symbol description, optional catch binding (when you don’t need to catch your errors) and stable sorting of arrays.

The future of JavaScript

Recently Axel published another very interesting article about the future of JavaScript. In it he writes about both upcoming features of the language and what he’d like it to have. Among these are:

- comparing objects by value like simple strings with special operator
- BigInt specification which allows you to use really large integers. This has been already implemented in recent Node.js versions, Chrome and Firefox.
- some basic functional programming stuff like do operator which allows you to write everything as expression
- and probably one of the most anticipated features is pipeline operator. So this is like passing a value through a pipeline instead of wrapping it in functions. It looks much cleaner this way.
- and of course extending the JS standard library with modern language principles which better correspond to modern development

As you can see, JavaScript, although it had a lot of changes in recent years, won’t stop evolving and moving forward. But what really nice is that nowadays these changes are much more in control and have clear and fluent implementation process than it was before.

Previous episodes

Episode #42

DevTrends #42

January 21, 2019

Free private repositories on GitHub. MySigMail

Episode #41

DevTrends #41

January 4, 2019

Microsoft Edge switches to Chromium. quicklink

Episode #40

DevTrends #40

December 11, 2018

The State of JavaScript 2018. React 16 Roadmap

weekly insights into the trends in web development

Sponsored by