On 19 December 2012 16:24, Kevin Smith <[email protected]> wrote: > I've worked up a concrete variation on the modules syntax: > > https://gist.github.com/4337062 > > I believe that it presents a clean, simple model and coding experience. > Comments welcome! >
Thank you! I agree with almost everything you suggest (and especially, what you say about anonymous exports), and your syntax pretty much exactly matches my preferences. I'm fine with considering syntactic module declarations separately (note, however, that you probably cannot define mutually recursive modules without them). What you _do_ want to have IMO, though, is module aliases module Short = Long.Qualified.Module.Name Referring to nested modules can be pretty tedious if you don't have a way to abbreviate names. (You can do that with 'let' or 'const', but then you lose all static checking.) OTOH, one more other feature I could consider dropping for the time being is the ability to export "from" a ModuleSpecifier. I'm not convinced that this is a common enough use case to warrant specialised extra syntax -- you can already express it by pairing an export with an import. (In fact, allowing the "export" keyword in front of imports seems like the more consistent way to support re-exporting.) /Andreas
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

