Re: Question about allowed characters in identifier names

2013-09-05 Thread Mathias Bynens
On 26 Aug 2013, at 04:08, Norbert Lindenberg ecmascr...@lindenbergsoftware.com wrote: On Aug 24, 2013, at 23:43 , Mathias Bynens math...@qiwi.be wrote: I would suggest adding something like `String.isIdentifier` which accepts a multi-symbol string or an array of code points to the

Re: Question about allowed characters in identifier names

2013-09-05 Thread Norbert Lindenberg
On Sep 5, 2013, at 1:06 , Mathias Bynens math...@qiwi.be wrote: On 26 Aug 2013, at 04:08, Norbert Lindenberg ecmascr...@lindenbergsoftware.com wrote: On Aug 24, 2013, at 23:43 , Mathias Bynens math...@qiwi.be wrote: I would suggest adding something like `String.isIdentifier` which

Re: Question about allowed characters in identifier names

2013-08-25 Thread Mathias Bynens
On 25 Aug 2013, at 04:17, Norbert Lindenberg ecmascr...@lindenbergsoftware.com wrote: I don't think that's a technical problem. String.isIdentifier{Start,Part}, as I proposed them, don't deal with actual identifiers in source text; they check individual identifier characters. The

Re: Question about allowed characters in identifier names

2013-08-25 Thread Norbert Lindenberg
On Aug 24, 2013, at 23:43 , Mathias Bynens math...@qiwi.be wrote: I would suggest adding something like `String.isIdentifier` which accepts a multi-symbol string or an array of code points to the strawman. Seems useful to be able to do `String.isIdentifier('foobar')` What would be the use

Re: Question about allowed characters in identifier names

2013-08-24 Thread Mathias Bynens
On 27 Feb 2012, at 22:58, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Feb 26, 2012, at 1:55 AM, Mathias Bynens wrote: For example, U+2F800 CJK COMPATIBILITY IDEOGRAPH-2F800 is a supplementary Unicode character in the [Lo] category, which leads me to believe it should be allowed in

Re: Question about allowed characters in identifier names

2013-08-24 Thread Mathias Bynens
On 24 Aug 2013, at 11:02, Mathias Bynens math...@qiwi.be wrote: Wouldn’t this be confusing, though? global['\u{2F800}'] = 42; // would work (compatible with ES5 behavior) global['\uD87E\uDC00'] = 42; // would work, too, since `'\uD87E\uDC00' == '\u{2F800}'` (compatible with ES5

Re: Question about allowed characters in identifier names

2013-08-24 Thread Norbert Lindenberg
On Aug 24, 2013, at 2:02 , Mathias Bynens math...@qiwi.be wrote: On 27 Feb 2012, at 22:58, Allen Wirfs-Brock al...@wirfs-brock.com wrote: var \ud87e\udc00 would probably still be illegal because each \u define a separate character but: var \u{2f800} =42; schould be find as should the

Re: Question about allowed characters in identifier names

2013-08-24 Thread Mathias Bynens
On 24 Aug 2013, at 22:13, Norbert Lindenberg ecmascr...@lindenbergsoftware.com wrote: On Aug 24, 2013, at 2:02 , Mathias Bynens math...@qiwi.be wrote: On 27 Feb 2012, at 22:58, Allen Wirfs-Brock al...@wirfs-brock.com wrote: var \ud87e\udc00 would probably still be illegal because each

Re: Question about allowed characters in identifier names

2013-08-24 Thread Norbert Lindenberg
On Aug 24, 2013, at 5:42 , Mathias Bynens math...@qiwi.be wrote: To clarify: consider what the Identifier Identification strawman[1] or any scripts that emulate similar behavior should do if Allen’s suggestion would be implemented: String.isIdentifierStart('\uD87E\uDC00'); // should

Re: Question about allowed characters in identifier names

2012-02-27 Thread Allen Wirfs-Brock
On Feb 26, 2012, at 1:55 AM, Mathias Bynens wrote: For example, U+2F800 CJK COMPATIBILITY IDEOGRAPH-2F800 is a supplementary Unicode character in the [Lo] category, which leads me to believe it should be allowed in identifier names. After all, the spec says: UnicodeLetter = any character

Question about allowed characters in identifier names

2012-02-26 Thread Mathias Bynens
For example, U+2F800 CJK COMPATIBILITY IDEOGRAPH-2F800 is a supplementary Unicode character in the [Lo] category, which leads me to believe it should be allowed in identifier names. After all, the spec says: UnicodeLetter = any character in the Unicode categories “Uppercase letter (Lu)”,