On Oct 4, 2012, at 10:09 AM, Brendan Eich wrote:
> Allen Wirfs-Brock wrote:
>> presumably, looking up "iterator" in a registry of string/symbol key value
>> pairs. Creating a new entry if one isn't present, and regardless returning
>> the symbol value associated with the string.
>>
>> public @iterator = Symbol('iterator');
>
> No, I wrote Symbol.intern('iterator') on purpose. What you wrote just makes a
> unique symbol with debugging/diagnostics string associated with it.
oops, typo on my part, i meant intern.
>
>> conceptually could just as easily be expressed as:
>>
>> public @iterator = RegistryOfWellKnownSymbols.lookup('iterator');
>
> Yes, Symbol.intern would be just like that -- but shorter and standard if we
> choose to do it.
>
> /be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss