[stringtemplate-interest] render vs toString
John D. Mitchell
jdmitchell at gmail.com
Mon Oct 12 08:24:08 PDT 2009
++
John
On Oct 12, 2009, at 05:56 , Sam Harwell wrote:
> The problem stems from ST violating the assumption in Java and C# that
> toString/ToString are pure functions, i.e. ones with no visible side
> effects on program state. I think this can/needs to be solved in
> either
> of two ways: make toString pure or rename it to something like render.
> Since changing the name to render is easier to ensure correct results,
> that might be the better approach at this point.
>
> Sam
>
> -----Original Message-----
> From: stringtemplate-interest-bounces at antlr.org
> [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of
> Terence
> Parr
> Sent: Sunday, October 11, 2009 3:53 PM
> To: stringtemplate-interest Template
> Subject: [stringtemplate-interest] render vs toString
>
> heh, it's pretty hard to debug ST when the debugger calls toString all
> the time on the templates. Using render makes much more sense. But,
> from a user perspective do you folks also run into trouble because of
> this or is it only debugging ST itself that is troubled by toString()?
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> _______________________________________________
> 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