Internationalization: New spec editor and draft

2015-02-08 Thread Norbert Lindenberg
A note for those who care about ECMAScript internationalization: Rick Waldron 
has taken over as the editor of the ECMAScript Internationalization API 
Specification, and has published a new draft of the second edition:
http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts

The focus of Rick’s work is to align the spec with the 6th edition of the 
ECMAScript Language Specification, but he also added a respecification of 
Array.prototype.toLocaleString.

Norbert
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


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 symbol. It's not an under-used generic suffix for all 
well-known symbol names. See 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring.


/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: @@toStringTag spoofing for null and undefined

2015-02-08 Thread Allen Wirfs-Brock

On Feb 8, 2015, at 5:35 AM, Gary Guo wrote:

> No one have comments on this?

See the latest (Feb 2) spec. revision: 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring
 ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


RE: @@toStringTag spoofing for null and undefined

2015-02-08 Thread Gary Guo
No one have comments on this?

From: nbdd0...@hotmail.com
To: ljh...@gmail.com
Subject: Re: @@toStringTag spoofing for null and undefined
Date: Sat, 31 Jan 2015 06:03:17 +
CC: es-discuss@mozilla.org








  Are the checks for these internal slots continuing to exist? Or shall 
we just set the @@toStringTag on their prototype and drop these steps.
For example:If the this value is undefined, return "[object Undefined]".
  If the this value is null, return "[object Null]".
  If O has an [[ParameterMap]] internal
  slot, let builtinTag be "Arguments".  Else, let 
builtinTag be "Object".
  Let tag be the result of GetV (O, @@toStringTag).
  ReturnIfAbrupt(tag).
  If tag is undefined, let tag be builtinTag.
  Else,
If Type(tag) is not String, let tag be
  "???".Return the String value that is the result of 
concatenating the three Strings "[object ", tag,
  and "]".Under the condition that Object.prototype[@@toStringTag], 
String.prototype[@@toStringTag]], etc are properly set.




  ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


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  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".
> 
>  __  __
> /  \/  \
> \  /ark
>Object Computing, Inc.
>   \  /
>\/olkmann

-- 
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de



___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: Property names for public symbols

2015-02-08 Thread Mark Volkmann
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".

 __  __
/  \/  \
\  /ark
   Object Computing, Inc.
  \  /
   \/olkmann

On Sun, Feb 8, 2015 at 4:20 AM, Axel Rauschmayer  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  wrote:
>
> 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 doesn't cut it, symbols win. But UPPERCASE loses.
>
> /be
>
>
> --
> Dr. Axel Rauschmayer
> a...@rauschma.de
> rauschma.de
>
>
>
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


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  wrote:
> 
> 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 doesn't cut it, symbols win. But UPPERCASE loses.
> 
> /be

-- 
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de



___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss