Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The New Vision of the Web is Clearer Than Ever Today

DZone's Guide to

The New Vision of the Web is Clearer Than Ever Today

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

Okay.  First the big news, and then we'll get to the bigger news.

The Next Version of JS, ECMAScript 2015, is Now Standard

The ECMA International committee approved the specification for the next version of JavaScript this week (remember, different versions of JavaScript are called ECMAScript mainly due to the trademark on "Java"). Like most standards, the new features have been known about for a while, and this week just opened the final door towards public validation and acceptance of this next version.

And man, did ECMAScript 2015 (that's the final, official name for it) have a lot of aliases. ES Harmony, ES.Next, and ECMAScript 6 (which made the most sense to me).

But now it's finally time for browsers to start supporting all these wonderful new features, like classes, modules, promises, maps, sets, and generators. Be sure to check out the full feature list with examples of each in this excellent set of community docs on GitHub.

Of course, developers have been able to get ahead of the curve and start using some of these features already because some browsers are ahead of the curve as well.  Here's the link to a well-organized chart on ES 2015 browser support:

ECMAScript 2015 Browser Support


WebAssembly: An Optimized Universal Language Target for the Web

"... the dream of a universal, language-neutral intermediate form goes back to well before Melvin Conway‘s UNCOL (1958, the same year LISP was born)." Brendan Eich (JS creator) pointed out this little history lesson as he made the world-shaking announcement yesterday that a W3C community group called the WebAssembly CG would begin a multi-year endeavor to build a new intermediate representation language (IRL), called WebAssembly, that will be compatible with any browser.

They'll start with the asm.js project as the initial framework (a project which John Resig, creator of jQuery, called one of the best JavaScript innovations in the last few years, back in 2013). asm.js is a subset of JavaScript that's already compatible with all browsers. WebAssembly, or wasm for short, is expected to stay compatible with asm.js and JS for the first few years of its development, and then diverge later on to become completely language-agnostic.

Google's Native Client (NaCl) team is throwing their support behind this project too, since it achieves what NaCl's original intention was: running native applications in the browser.  Any language that can be compiled into wasm will become an alternative to using JavaScript. Brendan Eich says that wasm is not a true bytecode, but a compressed abstract syntax tree (AST) encoding. 

Here are some other things that wasm will enable, according to scriptol.com:


  • It will be possible to use modules written in wasm in JavaScript programs (as is the case for asm.js). The ES6 module system will be used.
  • It has a garbage collector.
  • Two notations of the code are possible: binary for executing or text for reading. Like an assembly language - but it is not one.
  • A wasm LLVM backend is proposed initially. We can generate wasm code with an option from C/C++. It will then be available for other languages.
  • A polyfill: a JavaScript program that converts wasm code to asm.js for older browsers that do not support the first.

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:
css ,html5 ,javascript ,ecmascript ,asm.js ,web assembly ,wasm ,es next ,es harmony

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}