Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

Thaddee Tyl thaddee.tyl at
Sat Jan 28 03:57:12 PST 2012

On Sat, Jan 28, 2012 at 1:10 AM, Brendan Eich <brendan at> wrote:
>> Tom Van Cutsem < at>
>> January 27, 2012 10:53 AM
>>    Off-topic: What is the recommended style for naming modules?
>>    Capitalized and camel-cased? It’s nothing I couldn’t get used to,
>>    but it seems like the naming precedent would be JavaScript
>>    packages. Or is Reflect capitalized, because it is a built-in module?
>> I have been using @reflect as the name of the module, and Reflect as the
>> name of the module instance object, as in:
>> module Reflect from "@reflect";
> I believe that the latest (not yet in wiki) syntax uses 'at' not 'from' for
> the out-of-line module body case:
>  module M { ... }
>  module N at "U";
>  import P from M;
>  import P from "U";
> P is a pattern, in general. It could be * or an identifier if not a full
> destructuring pattern.

Related: this syntax doesn't prevent the user from naming its variable
"at", does it?

More information about the es-discuss mailing list