Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread Isiah Meadows
The first argument to each is an array of items. It's the same per lexical occurrence, but it's *not* the same across multiple lexical templates, even if they represent the same sequence of characters with interpolation expressions removed. That above expression is semantically more like this:

Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread Mark Miller
Template is transitively frozen, so it cannot be mutated in place. On Wed, Jan 9, 2019 at 11:49 AM T.J. Crowder < tj.crow...@farsightsoftware.com> wrote: > On Wed, Jan 9, 2019 at 7:40 PM Andrea Giammarchi > wrote: > > I dare saying tags are another issue here, 'cause "abc" === "abc", > > and

Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread T.J. Crowder
On Wed, Jan 9, 2019 at 7:40 PM Andrea Giammarchi wrote: > I dare saying tags are another issue here, 'cause "abc" === "abc", > and with an identity function such `const id = o => o`, > `id("abc") === id("abc")` but due latest changes to template > literals, id`abc` !== id`abc` so it's easily

Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread Andrea Giammarchi
I dare saying tags are another issue here, 'cause "abc" === "abc", and with an identity function such `const id = o => o`, `id("abc") === id("abc")` but due latest changes to template literals, id`abc` !== id`abc` so it's easily misleading in the tagged case. On Wed, Jan 9, 2019 at 7:53 PM Jordan

Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread Jordan Harband
import path specifiers are another. On Wed, Jan 9, 2019 at 10:16 AM T.J. Crowder < tj.crow...@farsightsoftware.com> wrote: > On Wed, Jan 9, 2019 at 5:36 PM FERREIRA, ERIC B > wrote: > > I contend that adding `NoSubstitutionTemplate`s to the definition of > > `StringLiteral` will bring the

Re: Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread T.J. Crowder
On Wed, Jan 9, 2019 at 5:36 PM FERREIRA, ERIC B wrote: > I contend that adding `NoSubstitutionTemplate`s to the definition of > `StringLiteral` will bring the benefit of allowing teams to > completely opt to use only template strings instead of mixing quote > marks, while having very little risk

Proposal: Add `NoSubstitutionTemplate` to `StringLiteral` Definition

2019-01-09 Thread FERREIRA, ERIC B
Some teams opt to use exclusively template strings in their code (see template literals are strictly better strings for some reasoning). This is almost supported by ECMA, but for the fact that