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');
conceptually could just as easily be expressed as:
public @iterator = RegistryOfWellKnownSymbols.lookup('iterator');
Allen
On Oct 4, 2012, at 10:01 AM, Kevin Smith wrote:
>
> Dave Herman mentioned another idea: intern'ing strings as symbols. You'd lose
> uniqueness but avoid colliding with any string. So
>
> public @iterator = Symbol.intern('iterator');
>
> Is this much better than just using 'iterator' or dunder-iterator?
>
> Apologies, but what would interning a string as a symbol mean?
>
> Kevin
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss