[stringtemplate-interest] v4 ST
Graham Wideman
gwlist at grahamwideman.com
Tue Oct 6 16:55:32 PDT 2009
Hi Ter,
At 10/6/2009 04:38 PM, Terence Parr wrote:
>heh, to distinguish between v4 and v3, I'm thinkingof using ST not
>StringTemplate for main class.
Sounds fine to me, but what happens at v5? :-)
> Also using inject (or add) instead of setAttribute:
I think "add" or "addAttribute" is a definite improvement over "setAttribute". I think "inject" is a step in a less-clear direction, because:
a) It fails to leverage what a user understands "add" to mean from other common classes.
b) It suggests that the calling of this method actively causes the info in the args to be "injected" into the finished template's output, when actually all it does is make the information accessible to the template during its later assembly (toString), and might actually have no ultimate effect if the template doesn't refer to it.
-- Graham
More information about the stringtemplate-interest
mailing list