Modular At-Names

David Herman dherman at mozilla.com
Fri Oct 12 14:22:39 PDT 2012


On Oct 12, 2012, at 12:45 PM, Kevin Smith <khs4473 at gmail.com> wrote:

> Also, I should mention a couple of things:
> 
> 1.  This design essentially paves the cowpath trod with underscore-prefixed property names, adding the desired property of conflict elimination.

Yes, although I don't take the "private, who needs it?" attitude as easily as you do. Not saying it's wrong, but I'm not 100% convinced yet. Anyway, still mulling, as I say.

> 2.  If "System" is a built-in *module instance*, and the @iterator symbol is defined internally within that module as:
> 
>     sym @iterator = "org.ecma-whatever.es.6.iterator"; // Or perhaps more likely a uuid...
> 
> Then we have exactly the desired syntax that we're looking for:
> 
>     import @iterator from System; // no funky "@belch" URLs!!
> 
>     class C {
> 
>       @iterator() { ... }
>     }

Doesn't this have the same problem you were arguing against in your previous message, that if you want to import 37 names, you have to name them all individually?

Dave



More information about the es-discuss mailing list