Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
Doesn't necessarily seem like a bad idea. I could be on board with that. > On Oct 22, 2015, at 6:18 PM, Mohsen Azimi wrote: > > Pardon my lack of use of proper terminology. > > This is kind of annoying working with large template strings. When I leave an > interpolation

Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Mohsen Azimi
Pardon my lack of use of proper terminology. This is kind of annoying working with large template strings. When I leave an interpolation placeholder(what's the right name?) empty it blows up all my code. Can it be forgiving like Ruby and CoffeScript and just replace it with empty string?

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Mark S. Miller
On Thu, Oct 22, 2015 at 8:54 PM, Caitlin Potter wrote: > > 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

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
I’m not making a claim about history, I wasn’t in the room when they were presented. It’s a claim about creating something that was never really needed by the vast majority of users. It’s nice to have, but it’s not the most useful aspect of template literals/quasi literals. It makes the spec

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
Cute, but nobody is realistically going to do that. Possible valid uses for the empty placeholder: - Contents of expression commented out, maybe debugging if it causes side effects which may be harmful - Expression is a placeholder, with contents soon to come (mentioned by OP) The DSL thing is

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Mark Miller
On Thu, Oct 22, 2015 at 7:20 PM, Caitlin Potter 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

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Mark S. Miller
JavaScript does not have string interpolation. It has arbitrary value interpolation. On Thu, Oct 22, 2015 at 8:34 PM, Caitlin Potter wrote: > Okay, but usability wise, this kind of sucks. There's a reason it's not > what people expect, and why other languages with

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
The history does not matter. It doesn’t make a difference what someone presented or argued for to a room full of people. What matters is how they’re actually used in practice. There are some libraries which do some clever things with them. They are not common, there are not a lot of them, and

RE: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Domenic Denicola
gt; Cc: es-discuss@mozilla.org Subject: Re: Any reason template string with empty interpolation placeholder (`${}`) throws? Cute, but nobody is realistically going to do that. Possible valid uses for the empty placeholder: - Contents of expression commented out, maybe debugging if it causes side e

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
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 > wrote: > > >> On Oct 22, 2015, at 4:55 PM, Mark

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Allen Wirfs-Brock
(oops, sent from wrong account) > On Oct 22, 2015, at 4:55 PM, Mark Miller > wrote: > > > > On Thu, Oct 22, 2015 at 7:20 PM, Caitlin Potter > wrote: > Cute, but nobody is realistically

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Caitlin Potter
> 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

Re: Any reason template string with empty interpolation placeholder (`${}`) throws?

2015-10-22 Thread Mark S. Miller
On Thu, Oct 22, 2015 at 8:58 PM, Caitlin Potter wrote: > The history does not matter. > Excuse me. "Tagged templates were an addition" sounded like a claim about history. > It doesn’t make a difference what someone presented or argued for to a > room full of people.