> why is to_unicode called twice?
I suppose it's an exercise for the optimizer to practice the common
subexpression elimination, and reduce that to one call.
Nah, I think I fixed this in my own tree, but didn't commit that yet.
> and can't we create a template for this construct?
Of course we can, but it's not really needed.
> And if you wonder...this was mostly an excercise for myself on how to
> write templates...
> Still if all/several of the encodings to the same thing we could
> provide something like this.
The disadvantage of using templates for everything is that it increases
compilation time. In this case, I think it's not really necessary to do it.
But once again, if you feel it's important, go ahead and do it.
I rather see that you use the templates in areas where it is needed more ;-)
Greets,
Asger