Comments on Meeting Notes

Brendan Eich brendan at mozilla.org
Tue Dec 4 12:54:04 PST 2012


Herby Vojčík wrote:
>> recommend a more conservative approach for ES6:  use the plain string
>> "iterator" as the protocol hook.  Once the syntactic issues have been
>
> I'd say not "iterator". This is a special identifier, so to speak 
> "instead-of-symbol-internal-name", so I would go for __iterator__. 
> Same for other few examples which may have benefited from symbols but 
> cannot.

TC39 probably will barf, but you make a good point -- so good it's what 
I implemented in JS1.7 and up in SpiderMonkey.

> It would create consistent __legacy__ realm where each member should 
> be obsoleted by evangelizing the right way once it appears (__proto__ 
> won't have one, it is too stuck; __{define|lookup}{Getter|Setter}__ 
> already have the right way; it can be same for __iterator__, 
> __create__, __hasInstance__ etc.). 

We hope to skip this legacy and leave it in the multiverse of 
alternative realities. Can we do it? If not now, why do you think we 
could do it later, when the dunder-names are sucking all the oxygen out 
of the "use symbols" room?

/be


More information about the es-discuss mailing list