endojs / Jessie

Tiny subset of JavaScript for ocap-safe universal mobile code
Apache License 2.0
281 stars 16 forks source link

Why not exclude the Script grammer target? #12

Closed allenwb closed 2 years ago

allenwb commented 6 years ago

Wonder why you appear to allow legacy Scripts when you could say that only the Module top level sematics is supported.

The primary difference between a script and a module with no import/export is implicit strict mode, top level declaration are module scopes, and top level this is undefined. Those all seem like desirable characteristics and having only a single kind of top level code unit seems like a significant simplification.

erights commented 6 years ago

Hi @allenwb , thanks for the suggestion. This seems like a good idea. Will close once I've revised the text.

erights commented 6 years ago

The grammar does not yet include export and import. See https://github.com/Agoric/Jessie/issues/8

erights commented 5 years ago

@allenwb , We've decided to take your suggestion. Once we support modules well in the ses-shim (attn @michaelfig ), we'll be able to close this.

michaelfig commented 2 years ago

Done.