[stringtemplate-interest] v4 ST
Terence Parr
parrt at cs.usfca.edu
Tue Oct 6 16:58:18 PDT 2009
Actually
st.add("name, "parrt");
might not be as clear as
st.put("name, "parrt");
but will people think it means "replace" instead of add? I kind of
like put
what about
st.attr("name, "parrt");
Ter
On Oct 6, 2009, at 4:56 PM, Terence Parr wrote:
>
> 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? :-)
>
> ha! still ST :)
>
>>
>>> 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.
>
> excellent arguments. ok, i'll make it add()
>
> Thanks
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list