Would it hurt them to use ${x} instead of \{x}?<p>I mean, "${x}" could already be a literal in strings before, but they have the <processor>. prefix to the string, which no old code would have. One needs to actively use it, and so that someone can also actively check not to write an unescaped ${x} when they don't want interpolation (like in other languages that use it).<p>Also the whole processor for escaping is imho ill-conceived. Escaping for a specific language like SQL should happen on the formatter instructions level, e.g.<p><pre><code> "SELECT airport_code FROM airports WHERE name != '%sql.string\{surname}'"
->
SELECT name FROM table_foo WHERE surname != 'O''Hare'
</code></pre>
or something to that effect (and similar for sql.identifier etc).<p>This way you could easily write classes with collections of methods to format a specific kind of language's values - and not have write a full formatter that parses and understands the whole string in context (as I assume is the case now, if you don't just use the naive STR/FMT one, as 99% will do).<p>Especially since you might need to handle multiple languages escaping rules in the same template, if you include strings for multiple languges/contexts in your template. What you do for that? Write the cartesian combo of template processors and make each understand and parse multi-language string tokens?