Given that `"use strict"` and `'use strict'` are both valid strict pragmas,
should `` `use strict` `` in the same position also be regarded as a valid
strict pragma?

Against:
* Backtick strings aren't really strings, but a kind of string-related
function call, and thus are more complex than the "basic" string literals.
Since "use strict" is such an elemental part of the language, only the most
basic of structures should be related to it.

For:
* In the context it's used, it does evaluate to a string (though of course
strict pragmas are recognised outside of expression validation - hence this
thread) so is essentially just as much a string representation as the other
forms.
* It's reasonable to expect to *mindfully* use the backtick prolifically as
"the new string delimiter", in the same way that one can mindfully use
`let` as "the new var", spread as "the new `.apply`" or arrow syntax as
"the new `function`". Restricting the use of backticks in this common
string usage seems unwarranted.

Neutral:
* "use strict" is intended to slowly ebb out of the language as module code
replaces script code, so it doesn't _really_ matter whether it's extended
to permit backticks or not.

Thoughts?
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to