> JavaScript does not have string interpolation. It has arbitrary value 
> interpolation.

Disagree. `foo ${bar} baz` is string interpolation. `${bar}` becomes 
`ToString(bar)`. Tagged templates were an addition that weren’t really needed. 
Since they exist, great, people can come up with some clever uses for them. But 
they’re hardly the common use case, which is definitely string interpolation

> On Oct 22, 2015, at 8:43 PM, Mark S. Miller <[email protected]> wrote:
> 
> JavaScript does not have string interpolation. It has arbitrary value 
> interpolation.
> 
> 
> On Thu, Oct 22, 2015 at 8:34 PM, Caitlin Potter <[email protected] 
> <mailto:[email protected]>> wrote:
> Okay, but usability wise, this kind of sucks. There's a reason it's not what 
> people expect, and why other languages with string interpolation behave 
> differently.
> 
> On Oct 22, 2015, at 8:24 PM, Allen Wirfs-Brock <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>> 
>>> On Oct 22, 2015, at 4:55 PM, Mark Miller <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> 
>>> 
>>> On Thu, Oct 22, 2015 at 7:20 PM, Caitlin Potter <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Cute, but nobody is realistically going to do that.
>>> 
>>> Since `${}` is a static error, what do you realistically think people will 
>>> do? Especially if they meant `${''}`, how do you expect them to react to 
>>> the static error?
>> 
>> Just like they do if they have a line of code that reads:
>> 
>> ```js
>> str = ;
>> ```
>> 
>> when they meant
>> 
>> ```js
>> str = ‘’;
>> ```
>> 
>> It’s just a syntax error.  I probably have syntax errors in 50% of the lines 
>> that I initially type.  I parse, and then fix.
>> 
>> Allen
>> 
> 
> 
> 
> --
>     Cheers,
>     --MarkM

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to