Symbol.keyFor
# Mark S. Miller (12 years ago)
Suggestions?
Suggestions? On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer <axel at 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 Rauschmayer > axel at rauschma.de > > home: rauschma.de > twitter: twitter.com/rauschma > blog: 2ality.com > > > > > _______________________________________________ > es-discuss mailing list > es-discuss at mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > > -- Cheers, --MarkM -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131221/c48b41ea/attachment.html>
# Axel Rauschmayer (12 years ago)
Offhand, ID instead of key, but that is awfully generic. It may make sense to invent a new term.
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 <erights at google.com> wrote: > Suggestions? > > > On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer <axel at 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 Rauschmayer > axel at rauschma.de > > home: rauschma.de > twitter: twitter.com/rauschma > blog: 2ality.com > > > > > _______________________________________________ > es-discuss mailing list > es-discuss at mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > > > > > -- > Cheers, > --MarkM -- Dr. Axel Rauschmayer axel at rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131222/69cbb78e/attachment.html>
# Bill Frantz (12 years ago)
In KeyKOS we used the word "name". We had another meaning for the word "key" and wanted to avoid confusion.
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, axel at 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 22, 2013, at 6:53 , Mark S. Miller <erights at google.com> wrote: > >>Suggestions? >> >> >>On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer <axel at 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 Rauschmayer >>axel at rauschma.de >> >>home: rauschma.de >>twitter: twitter.com/rauschma >>blog: 2ality.com >> >>-- >>Cheers, >>--MarkM > --------------------------------------------------------------------------- Bill Frantz | "I wish there was a knob on the TV to turn up the 408-356-8506 | intelligence. There's a knob called "brightness", but www.pwpconsult.com | it doesn't work. -- Gallagher
# Kevin Smith (12 years ago)
"Name" is good.
Symbol.name(Symbol.for("foo")) === "foo";
Or some variant thereof.
> > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131222/2bfc9ea8/attachment-0001.html>
# Rick Waldron (12 years ago)
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"
.
On Sun, Dec 22, 2013 at 10:18 AM, Kevin Smith <zenparsing at 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 interferes with the name property that all function objects have—the Symbol.name property would no longer have the expected value "Symbol". Rick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131222/a3b69633/attachment.html>
# Kevin Smith (12 years ago)
Oh yes - doh! : )
> > >> "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! : ) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131222/879dfe4d/attachment.html>
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.