Earlier quoted context omitted.
And after you replicated PHP you come to the conclusion the templating language is as slow as hell. So you think: maybe we would need a compiler so we can cache the templates. The question ofcourse is: why would people rather use: {for item in list} {item.name} {end for} instead of: ' . $item['name'] . ' '; } ?> And I think this goes deep. People are looking for more human ways to express themselves. And PHP is not a…
Note than in PHP you can also rewrite it as: Or with shortened PHP tags and alternative control structure syntax: Which at this point just differs in delimiters ( instead of { and }) from the template language. I don't have an opinion on this "more human way" to express oneself, but it seems that it would connect this case with the reason people seem to prefer curly braces to parenthesis in code too.
Which is, IMO, the main problem with using PHP (or any other from of plain string concatenation) as a templating language. Escaping everything (and security in general) should be the default, not something that you have to opt into at every turn.