I haven’t spoken enough about the rationale for declarative, static module resolution in ES6 modules. Since multiple module systems exist in pure JS, the concept of modules that involve new syntax is coming across as foreign to people. I’d like to explain the motivation.
Let’s see if we can. I’ve had a bunch of productive conversations since my post the other day.
Here’s the deal: typed arrays are not fully portable. On most browsers, this code will print 1:
var a1 = new Uint32Array(); var a2 = new Uint8Array(a1.buffer); console.log(a2)