this vs thi\u0073

Mike Samuel mikesamuel at
Tue Jun 21 12:00:48 PDT 2011

2011/6/21 Brendan Eich <brendan at>:
> I think some engines just have a bug to fix here, nothing more. :-/

I think the spec could be clearer as to whether "but not ReservedWord"
applies before or after the IdentifierName is decoded.

I'm happy to file bugs if people tell me what the bug is?

Is it

(A) Not treating reserved words with characters
    escaped where an Identifier is expected as a
    syntax error.

    var \u0069\u0066

    should be a syntax error.

(B) Not distinguishing identifiers whose decoded
    IdentifierName is a reserved word as distinct
    from the keywod.

    eval("var thi\\u0073; this !== thi\\u0073")

    should be true.

More information about the es-discuss mailing list