Backwards compatibility and U+2E2F in `Identifier`s
mathias at qiwi.be
Wed Sep 18 13:32:50 PDT 2013
On 18 Sep 2013, at 21:05, Anne van Kesteren <annevk at annevk.nl> wrote:
> On Mon, Aug 19, 2013 at 5:25 AM, Mathias Bynens <mathias at qiwi.be> wrote:
>> After comparing the output, I noticed that both regular expressions are identical except for the following: ECMAScript 5 allows U+2E2F VERTICAL TILDE in `IdentifierStart` and `IdentifierPart`, but ECMAScript 6 / Unicode TR31 doesn’t.
> Per ES6 identifiers start with code points whose category is ID_Start
> which per http://www.unicode.org/reports/tr31/ includes Lm which per
> http://www.unicode.org/Public/UNIDATA/UnicodeData.txt is true for
> U+2E2F. So why exactly is it disallowed?
`ID_Start` includes code points in the `Lm` category indeed, but then later explicitly disallows `Pattern_Syntax` and `Pattern_White_Space` code points. As it says on the page you linked to:
> In set notation, this is [[:L:][:Nl:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]] plus stability extensions.
U+2E2F has the `Pattern_Syntax` property and is thus not a valid `ID_Start` code point.
More information about the es-discuss