[Putting this back on m5-dev]

> This is all new to me... I had no idea templating was such the rage.
> Makes sense for web apps I guess.
Yeah, I don't know why I didn't got that route before improving
code_formatter and using it.

> I agree that it's better to use an existing tool if appropriate than
> to write our own; if the author of code_formatter is willing to
> abandon it then that's a pretty strong sign.
I willingly throw out code for better code. :) The funny thing is that
I have a fair bit of experience with Kid and It never dawned on me to
find something like it that would work well for C++ code generation.

> I just skimmed the links on the wiki page briefly and did some
> googling for other people's comparisons, and based on this totally
> unscientific and non-comprehensive approach I'd lean toward Mako.
I guess I hadn't seriously considered Mako because somewhere it was
listed as beta, but it seems to be pretty solid now actually.

> - Genshi seems pretty strongly oriented towards xml; even though it
> can do plain text, I get the impression that's almost an afterthought,
> and the things people mention when they rave about it is how good it
> is for xml because it really understands the xml it's generating
> (e.g., in xml mode it requires well-formatted templates and then
> guarantees to output well-formatted xml).  Also, not that we care that
> much about performance, but it's pretty widely criticized for being
> slow (for example, see
> http://chrismoos.com/2008/01/27/genshi-vs-mako/).
I guess I was personally leaning towards genshi because it is sort of
the successor to kid and I love kid.  It might be wishful thinking
that genshi is as cool at plaintext as it is at XML.  I haven't looked
at it enough to know.  Genshi would be more useful if we wanted to do
both html and C++, but I guess our bias is/will be so much towards C++
that it should really be the only consideration.

> - It's harder to pick between Jinja and Mako, but the following links
> seem to imply that Mako is a little more pythonic, while Jinja may be
> better for web developers who are more used to django:
In the jinja faq: http://jinja.pocoo.org/1/faq, they seem to say that
the primary reason to pick jinja is sandboxing.  Given that security
is not an issue for us, sandboxing doesn't matter much.

I'll spend some time looking at these more, probably focusing on Mako.
 I'll probably also keep in mind the idea of subclassing or wrapping
them so that they suit our particular needs.

  Nate
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to