Re: Why does Symbol.for and Symbol.keyFor are limited to strings?

2015-01-02 Thread Allen Wirfs-Brock
On Jan 2, 2015, at 9:18 AM, Michał Wadas wrote: What is reason behind restricting entries in global symbol registry to be indexed only by strings? What are the use cases for anything other strings? Allen ___ es-discuss mailing list

Why does Symbol.for and Symbol.keyFor are limited to strings?

2015-01-02 Thread Michał Wadas
What is reason behind restricting entries in global symbol registry to be indexed only by strings? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

RE: Why does Symbol.for and Symbol.keyFor are limited to strings?

2015-01-02 Thread Gary Guo
Why not? Symbol's [[Description]] internal slot is string Date: Fri, 2 Jan 2015 18:18:55 +0100 Subject: Why does Symbol.for and Symbol.keyFor are limited to strings? From: michalwa...@gmail.com To: es-discuss@mozilla.org What is reason behind restricting entries in global symbol registry

Re: Symbol.keyFor

2013-12-22 Thread Bill Frantz
In KeyKOS we used the word name. We had another meaning for the word key and wanted to avoid confusion. Cheers - Bill On 12/22/13 at 9:57 PM, a...@rauschma.de (Axel Rauschmayer) wrote: Offhand, ID instead of key, but that is awfully generic. It may make sense to invent a new term. On Dec

Symbol.keyFor

2013-12-22 Thread Kevin Smith
In KeyKOS we used the word name. We had another meaning for the word key and wanted to avoid confusion. Name is good. Symbol.name(Symbol.for(foo)) === foo; Or some variant thereof. ___ es-discuss mailing list es-discuss@mozilla.org

Re: Symbol.keyFor

2013-12-22 Thread Rick Waldron
On Sun, Dec 22, 2013 at 10:18 AM, Kevin Smith zenpars...@gmail.com wrote: In KeyKOS we used the word name. We had another meaning for the word key and wanted to avoid confusion. Name is good. Symbol.name(Symbol.for(foo)) === foo; Or some variant thereof. I like this, but it

Re: Symbol.keyFor

2013-12-22 Thread Kevin Smith
Name is good. Symbol.name(Symbol.for(foo)) === foo; Or some variant thereof. I like this, but it interferes with the name property that all function objects have—the Symbol.name property would no longer have the expected value Symbol. Oh yes - doh! : )

Re: Symbol.keyFor

2013-12-21 Thread Mark S. Miller
Suggestions? On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer a...@rauschma.de wrote: One problem with that method name: it overloads the term “key”. At the moment, property keys are either strings or symbols. If a symbol can also have a key, I’d find that confusing. Axel -- Dr. Axel

Re: Symbol.keyFor

2013-12-21 Thread Axel Rauschmayer
Offhand, ID instead of key, but that is awfully generic. It may make sense to invent a new term. On Dec 22, 2013, at 6:53 , Mark S. Miller erig...@google.com wrote: Suggestions? On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer a...@rauschma.de wrote: One problem with that method name: