WebAssembly / esm-integration

ECMAScript module integration
https://webassembly.github.io/esm-integration/js-api/index.html#esm-integration
Other
378 stars 32 forks source link

Start uninitialized Wasm exports in TDZ? #18

Closed littledan closed 5 years ago

littledan commented 6 years ago

In the README for this proposal, both before and after #13, Wasm exports are initialized as undefined, from the beginning of the evaluation phase, before the evaluation of the particular module runs. ES2015 introduces the "temporal dead zone", a mechanism where undefined things can trigger a ReferenceError rather than mysteriously show up as undefined. Would it make sense to use that here?