RE: Property names for public symbols

2015-02-09 Thread Gary Guo
How about classTag instead of toStringTag, which makes it sound like a noun. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Property names for public symbols

2015-02-09 Thread Jordan Harband
[[Class]] was the pre-ES6 term to refer to this value, but with the ES6 class keyword that would be confusing, and I don't think it would be a good idea to conflate the meaning of the term even further. toString is a common single idiom in JS since it's the function that String() invokes, so

Re: Property names for public symbols

2015-02-08 Thread Axel Rauschmayer
Got it: public symbols stand for property names and those are typically camel-case, starting with a lowercase letter. On 08 Feb 2015, at 02:09, Brendan Eich bren...@mozilla.org wrote: Axel Rauschmayer wrote: Can you explain what you mean by “same-named”? You want `Symbol.for()` to have

Re: Property names for public symbols

2015-02-08 Thread Mark Volkmann
AM, Axel Rauschmayer a...@rauschma.de wrote: Got it: public symbols stand for property names and those are typically camel-case, starting with a lowercase letter. On 08 Feb 2015, at 02:09, Brendan Eich bren...@mozilla.org wrote: Axel Rauschmayer wrote: Can you explain what you mean by “same

Re: Property names for public symbols

2015-02-08 Thread Axel Rauschmayer
This symbol is about the string tag. On 08 Feb 2015, at 14:05, Mark Volkmann r.mark.volkm...@gmail.com wrote: I'm curious why one of the public symbols has a name that ends with Tag (toStringTag), but the others don't (such as toPrimitive). Maybe toStringTag should be changed to toString.

Re: Property names for public symbols

2015-02-08 Thread Brendan Eich
Mark Volkmann wrote: I'm curious why one of the public symbols has a name that ends with Tag (toStringTag), but the others don't (such as toPrimitive). Maybe toStringTag should be changed to toString. That would be the wrong name -- the Tag is specific, particular to the purpose of this

Re: Property names for public symbols

2015-02-07 Thread Axel Rauschmayer
Can you explain what you mean by “same-named”? You want `Symbol.for()` to have the same casing as `Symbol.iterator`? On 07 Feb 2015, at 02:17, Brendan Eich bren...@mozilla.org wrote: Some tasteful inconsistency (the hobgoblin of big minds) is required here. We want the well known symbols'

Re: Property names for public symbols

2015-02-07 Thread Brendan Eich
Axel Rauschmayer wrote: Can you explain what you mean by “same-named”? You want `Symbol.for()` to have the same casing as `Symbol.iterator`? No, I mean we would normally use iterator (and had __iterator__ in SpiderMonkey, then '@@iterator' I believe), not ITERATOR. Python's dunder-bracketing

Re: Property names for public symbols

2015-02-06 Thread Brendan Eich
Some tasteful inconsistency (the hobgoblin of big minds) is required here. We want the well known symbols' names as static properties of Symbol to be same-named. /be Mark Volkmann wrote: Agreed, like at the constants on the Math object. --- R. Mark Volkmann Object Computing, Inc. On Feb 6,

Re: Property names for public symbols

2015-02-06 Thread Mark Volkmann
Agreed, like at the constants on the Math object. --- R. Mark Volkmann Object Computing, Inc. On Feb 6, 2015, at 12:39 AM, Axel Rauschmayer a...@rauschma.de wrote: I know that this is a small nit and that it’s probably too late, but: Shouldn’t public symbols (`Symbol.iterator` etc.) have

Re: Property names for public symbols

2015-02-06 Thread Gary Guo
Probably too late, since ther is already implementations starting implementing them, what's more, I think constant are not necessarily uppercase - we should not apply convention of C on ECMAScript. To me it is reasonable to use lowercase. ___ es-discuss

Property names for public symbols

2015-02-05 Thread Axel Rauschmayer
I know that this is a small nit and that it’s probably too late, but: Shouldn’t public symbols (`Symbol.iterator` etc.) have all-uppercase property names? It would indicate that they are constants and it would visually set them apart from other stuff that is in `Symbol` (`Symbol.for()` etc.).