While Eich’s talk focused on iterating and improving the language’s capabilities, Crockford focused on whether JavaScript could take software engineering to the next level: globally distributed, secure, asynchronous programming.

Eich talked about how JS has changed over the years and how soon it will be updated again. For example, E4X was never accepted by JS, but “E4X with the bad XML parts stripped out,” or JSX, was loved by many React users.

Eich mentioned that one of the biggest regrets in creating JavaScript was that, so soon after the first version of JavaScript was released, it was a matter of trying to meet users’ needs rather than solving their problems. For example, the equality operator == is used for casting, such as 12 ==’12’, to facilitate pushing data to the server over HTTP.

In his presentation, Eich also highlighted the value of ASM and WebAssembly. Asm.js is a subset of JavaScript static types, and asM.js source code runs close to native.

This performance improvement comes from ASM’s support for JIT conversions to AOT compilation and direct conversions from abstract syntax trees (AST) to machine code generation.

WebAssembly is a faster loading and more versatile version of ASM.js. WebAssembly runs in a separate process, so its syntax is more expressive than JavaScript, but it is still part of the JavaScript virtual machine.

Eich is excited about these language features coming next year:

  • TC39 BigInt – A new value type that can handle integers with arbitrary precision and supports TypedArrays

  • Dynamic Import () – ES module imports are static by default, Dynamic imports support prefetching

  • Flat/flatMap – Array flatness, and it’s smooshgate’s solution

  • More deconstruction – Can be used with any object and array

  • Private methods and accessors in classes – Eich believes that the symbol prefix “#” is somewhat controversial and should not be used anymore

  • Async iteration-for-await-of syntax

  • The improvement of the RegExp

For more information on these proposals, please refer to the TC39 proposal a complete list of (https://github.com/tc39/proposals).

During the q&A portion of his talk, Eich was asked about the status of the binary Abstract Syntax Tree (Binary-AST) proposal, which sits between JavaScript and WebAssembly and provides binary syntax trees for all JavaScript.

Eich sees binary-AST as a potentially useful approach, but it is up to practice and subsequent performance metrics to confirm its advantages. Mozilla is conducting preliminary experiments. Its potential risks include that it can become another vehicle for security attacks, and that it simply encourages developers to write larger JavaScript codebardes rather than relying on tools and rules to optimize their codebardes.

When asked about type systems such as TypeScript, Eich commented that dynamic programming is a very good type system with great convenience and no hindrment. “People are used to using type systems that don’t cost anything,” Eich points out.

TypeScript is great because it is a strict superset of JS. Every JS program is a TS program. Anders Hejlsberg is superb.

Eich was asked if he would standardize a library like React. He points out how early libraries like Dojo and Prototype introduced their concepts into later versions of JS, noting, “We don’t standardize libraries like React.” Instead, we tried to promote essential Primitives from the library into the core language. Eich pointed out that doing standardization too early can lead to problems, especially for solutions such as type systems.

Asked for his opinion on the Observables proposal based on RxJS Observables. Eich pointed out that the specification has stalled and that building a desired feature into the language is a huge challenge. And he’s not sure whether Observable should be added to the language. He made no mention of the WHATWG specification for streams (https://github.com/whatwg/streams) is a superset of Observables (superset), Perhaps the competition between the two proposals hindered the progress of the Observables proposal.

Finally, Eich was asked about machine learning, and he argued that while deep learning is useful, it doesn’t tell us anything about cause and effect, it’s just an advanced form of curve-fitting.

For now, Crockford points out that achieving this goal is difficult because all programming languages, including JavaScript, are stuck in the old architecture of single-machine, single-address Spaces.

But because JavaScript can do so many interesting things with functions and objects, Crockford thinks it’s easier to achieve this goal than other languages.

According to Crockford, programming languages have a common problem: they can be too focused on fixing “bad plastic surgery” without a clear vision of the future.

I think there are fewer good parts of the language than there were ten years ago, but the good parts are getting better.

At the meeting, Crockford challenged some of his audience’s assumptions and pointed out that they had a big impact on our progress. For example, he thinks we should start counting from zero, and explains why everything should start from zero.

Crockford points out that the biggest flaw in ES2015 so far is the lack of proper tail calls or tail-call optimization, a part of the specification that only Safari has implemented so far. According to Crockford, tail calls are the most important feature of ES2015 because they help support tail recursion, iteration of feature substitution, and continuation passing.

Crockford believes that pure functions are the most critical thing in future languages, and that anything that affects them should not be considered for use in languages.

Crockford doesn’t like many features of JavaScript. For example, he doesn’t like async/await because it prevents developers from understanding asynchronous programming and makes it seem synchronous.

Crockford explained his view of the word “simple” : “The simpler the standard, the less agreement there is and the more interoperability is possible.” He uses JSON as an example, explaining that JSON is a syntax that does not specify behavior and is easy to understand and use. All the syntax of JSON can be placed on the back of a business card.

Crockford is working on a new language and compiler called “NEO” that implements Crockford’s approved JavaScript features in a new language and compiles well-defined JavaScript programs from source to source, More details will be published in a book called How JavaScript Works.

Crockford was also asked about TypeScript and said, “TypeScript doesn’t solve the problems I have.” This misunderstanding of TypeScript somewhat contradicts his earlier statement that “errors usually occur between interfaces of things,” because one of TypeScript’s most important advantages is that it helps define interfaces to prevent these errors from happening.

https://skillsmatter.com/skillscasts/10595-opening-keynote-javascript-the-next-generation

https://skillsmatter.com/skillscasts/11232-keynote-how-javascript-works-a-preview

https://www.infoq.com/news/2018/07/eich-crockford-js-future