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
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to