[stringtemplate-interest] need a null value for arguments?
Terence Parr
parrt at cs.usfca.edu
Mon Aug 1 12:33:51 PDT 2011
On Aug 1, 2011, at 7:10 AM, Udo Borkowski wrote:
> Not sure about the semantic of null.
>
> E.g. assume you have this template
>
> t(s="world") ::= "Hello <s>"
>
> What will
>
> <t(null)>
>
> render?
>
> a) "Hello " (i.e. same as <t("")>)
> b) "Hello world" (i.e. same as <t()>)
I would assume it would render this one since the parameters missing.
> c) "Hello null"
> d) something else?
>
>
> Also: to avoid confusion with the Java null maybe call the constant 'undefined'?
I was kind of thinking that it should be null because it has the same semantics as passing all in to add().
Ter
More information about the stringtemplate-interest
mailing list