Templates cause bugs. The solitary appropriate solution is an unparser – a component that walks an AST and serializes it. Making sure the result conforms to the grammar of the output language without any unparser would always involve a parser. > As soon as I'm looking at more than one programming or markup language in the same file, I'm looking at spaghetti code. Iain Dooley, December 2011 http://www.workingsoftware.…
This article has some good points but the reasons we add more logic to templates are: - just pre-generating everything outside of the template can be very efficients. Especially if you language can't make everything lazy or if you have several representations for the same dataset. - designers want a bit more freedom that just printing x. Having to go back to the dev team everytime you need a little tweak is terrible…
Separation of concerns is a thing that can help designers, no?