Intent to ship: allowing invalid escape sequences in tagged template literals

30 views
Skip to first unread message

no spoon

unread,
Jul 14, 2017, 3:03:13 PM7/14/17
to v8-u...@googlegroups.com
Contact email: bak...@gmail.com


This feature is stage 4 and will be included in the 2018 edition of ECMA-262.

Summary: ES6 template literals forbid certain escape sequences, like `\u{not hex}`. But tagged templates expose to user code the raw code points of the template literal, and some applications only care about those. As such, this stage 4 TC39 proposal allows such invalid escape sequences in tagged template literals. The "cooked" value of such a template (that is to say, with escape sequences interpreted), which is also exposed to user code, is `undefined`.

Interop risk: This new language feature allows syntax that was previously a SyntaxError, so compatibility risk is low.

Firefox has shipped this feature ( https://bugzilla.mozilla.org/show_bug.cgi?id=1317375 ).
Safari has implemented this feature ( https://bugs.webkit.org/show_bug.cgi?id=166871 ) and shipped it in at least Tech Preview.
Edge has not implemented this feature ( https://github.com/Microsoft/ChakraCore/issues/2344 ).


Adam Klein

unread,
Jul 14, 2017, 9:39:14 PM7/14/17
to no spoon, v8-users
LGTM!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAmJwf-1smMw8SYUW0Lb0pW1vD8krUKZROEbBYySTwHes4ZSsw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages