tc39 / proposal-built-in-modules

BSD 2-Clause "Simplified" License
892 stars 25 forks source link

Editorial: Simplify, remove evaluation steps #45

Closed littledan closed 5 years ago

littledan commented 5 years ago

In this model, the exports of a synthetic module are immutable from when the module is first created, and there is no opportunity for the module to run any steps at evaluation time.

littledan commented 5 years ago

Maybe I'm missing something about the important applications of the evaluation steps; I don't know the full set of things that people want to do with built-in modules. But, for embedding specifications that don't need the steps or mutability, I hope these sorts of simplified constructors make it less repetitive, which could translate into fewer errors.

littledan commented 5 years ago

Never mind about this PR; it doesn't make sense in terms of how the construction of classes, etc should be evaluated for things like kv-storage (even if JSON is parsed ahead of time, and the module map is what controls [SecureContext] rather than dynamic exceptions).