Closed
Description
Description
A few months ago I hacked up support on top of Symfony EL for ES6-style template literals*.
While it works reasonably well (even though a hack, thanks to Symfony's ongoing extension hostility), I think it could make sense to have this built-in:
- template strings are extremely convenient in expressions:
`${greeting} ${name}!`
instead ofgreeting ~ ' ' ~ name ~ '!'
- Symfony's use of tilde as a concatenation operator is extremely unpopular
- since backticks are not currently a part of the EL syntax, implementing this feature will be backword compatible and relatively easy to implement
* the current implementation linked above does not change the Symfony EL parser/internals, but rather converts templating string syntax to Symfony syntax; using brackets and tildes.
Example
`Fifteen is ${a + b} and not ${2 * a + b}.`