TT3++ # Better than a Pony

Thus Spake Andy:

I would be putting myself out on a limb if I said that TT3 was better than a pony, but I can say quite confidently that it is better than TT2. The current implementation is a little sluggish compared to TT3, but I've made no effort on optimisation yet. At the moment my priority is getting the functionality working. TT2 compiles templates to Perl code. Right now TT3 builds a parse tree and executes that. It will be quite easy to generate Perl code (using a tree view) when the time is right and that should speed things up a bit. But like I say, functionality first, optimisation second. Having a proper parse tree makes it much easier to introspect templates (e.g. to see what variables are used) and to transform them in various interesting ways (e.g. to generate HTML, Perl, JS, Parrot bytecode, C code, etc).

TT3 is much more flexible than TT2 or indeed, any other templating language that I'm aware of. Everything and anything can be changed: pluggable engines, pluggable dialects, pluggable tagsets, pluggable commands, and of course, pluggable plugins (although plugins aren't implemented yet). This flexibility is important for backward compatibility (so that people can continue to process TT2 templates alongside TT3 templates) and also for future extensibility (so we can add new things to the language without breaking existing templates).

Unlike that pony that you've wanted for years, TT3 will be here in time for christmas (as an alpha release). And best of all - it doesn't smell of piss.