[Petal] New syntaxes
Grant McLean
grant at mclean.net.nz
Thu Jul 10 08:21:41 BST 2003
William McKee wrote:
> I like to keep things really simple and don't
> mind sacrificing speed for simplicity when it comes to templates that
> will be edited by designers.
...
> Would it be possible to
> change the code generator to produce the faster output after determing
> the nature of thing/key?
...
> maybe we could add another parameter to
> indicate whether to fixate references in the template when the code
> generator produces the compiled template.
I'd vote for that approach to. I can see the performance advantage
of compiling simplified accessors but if it comes at the cost of
'polluting' Petal's syntax with Perlisms like curly braces then I
don't think it's worth it.
As William suggests, if we could set an option that caused the
simpler accessor methods to be selected based on the type of arguments
passed to the first template invocation then we could have the best
of both worlds - better performance with no syntax change.
Regards
Grant
More information about the Petal
mailing list