Frankie Bagnardi (2015-02-05T15:05:53.000Z)
I think any issues with that are imagined.  Languages have rules, and of
the people who both know what 'use strict' does and are using es6 syntax,
they're very unlikely to make the mistake.

I don't see people using template literals for arbitrary strings... it
could happen but it probably won't.  Mathias makes a good point also, it's
not strings that equal the string 'use strict', it's exactly two possible
arrangements of characters.



On Thu, Feb 5, 2015 at 6:12 AM, Andy Earnshaw <andyearnshaw at gmail.com>
wrote:

> I think you're missing the point Leon is trying to make.  He's saying
> that, in ES 6 we have a new way to write strings.  In some ways, these more
> powerful strings may condition some people to use ` as their main string
> delimiter.  An unsuspecting person may liken this to PHP's double quotes vs
> single quotes, thinking that the only difference is that you can use
> `${variable}` in strings that are delimited with backticks, but other than
> that everything is the same.  When they write this in their code:
>
> ```
> `use strict`;
> ```
>
> They may introduce bugs by writing non-strict code that doesn't throw when
> it should.  Adding it to the spec wouldn't be difficult and it would avoid
> any potential confusion or difficult-to-debug issues.  It's definitely
> easier than educating people, IMO.
>
> On Thu, Feb 5, 2015 at 10:56 AM, Mathias Bynens <mathias at qiwi.be> wrote:
>
>>
>> > On 5 Feb 2015, at 11:04, Leon Arnott <leonarnott at gmail.com> wrote:
>> >
>> > Well, that isn't quite the full story - if it were just a case of
>> pragmas having to use something, anything, that could pass ES3 engines,
>> then there wouldn't necessarily be two otherwise-redundant forms of the
>> syntax - `"use strict"` and `'use strict'`. The reason those exist is to
>> save the author remembering which string delimiter to use - it mirrors the
>> string literal syntax exactly.
>>
>> If that were the case, then e.g.
>> `'\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74'` would trigger strict mode. (It
>> doesn’t, and that’s a good thing.)
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150205/6cf0c0e0/attachment.html>
d at domenic.me (2015-02-17T18:02:10.327Z)
I think any issues with that are imagined.  Languages have rules, and of
the people who both know what 'use strict' does and are using es6 syntax,
they're very unlikely to make the mistake.

I don't see people using template literals for arbitrary strings... it
could happen but it probably won't.  Mathias makes a good point also, it's
not strings that equal the string 'use strict', it's exactly two possible
arrangements of characters.