Any reason template string with empty interpolation placeholder (`${}`) throws?
Jason Orendorff
jason.orendorff at gmail.com
Fri Oct 23 04:23:07 UTC 2015
On Thu, Oct 22, 2015 at 7:34 PM, Caitlin Potter <caitpotter88 at gmail.com> 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.
Perl and bash both treat "${}" as a syntax error. So does Python's
string.Template().
I think it would be a mistake to sweep this kind of situation under
the rug. Pointing out a place where the programmer started to type
something but then never finished it seems like a good thing.
-j
More information about the es-discuss
mailing list