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

37 views
Skip to first unread message

no spoon

unread,
Jul 14, 2017, 3:03:11 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 ).


Reply all
Reply to author
Forward
0 new messages