Kevin Smith wrote:
FWIW, in my estimation, tagless template strings which interpolate by default are one of the top 5 usability improvements in ES6.

Agreed.

Dave's point, that the use-cases for tagless template strings outnumber innerHTML XSS-concern use-cases by a large factor, is important.

Doug Crockford observed that template strings won over String.format in large part because of greater opportunity for safer APIs. But this cut both ways, since removing tagless template strings will not necessarily make everone use

str`a ${b} c`

where they could have used

`a ${b} c`

with an appropriate str binding. And adding such a str binding will, by the safety-first argument, lead people away from

html`a ${b} c`

Making the str name longer and harder to use will simply leave people inventing String.format libraries.

As always, unusable but safer APIs should be viewed as unsafe because not usable, so not used.

The committee did not reach an agreement, but we will keep working to serve the most common use-cases. I think this must mean tagless template strings that interpolate, as proposed and accepted for ES6.

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

Reply via email to