[stringtemplate-interest] v4 ST
Terence Parr
parrt at cs.usfca.edu
Tue Oct 6 17:54:37 PDT 2009
I also use "inject" a lot in my papers and book. hmm...a tough call.
Ter
On Oct 6, 2009, at 4:55 PM, Graham Wideman wrote:
> 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