|
On 24.01.2012 20:34, Tony Finch wrote:
A more principled approach is to parse everything as it comes in off the wire into a tree-structured internal representation. Instead of interpolating strings into templates you graft tree nodes into slots. You then serialize the parse tree back into its external representation when sending it out, and the serializer will naturally either do the right thing or fail clearly.
+1 (+ the same for the templates itself (interpolation as trees merge operation before serialization))