> I think a more useful extension would be the Groovy :? operator
> 
>  expression ?: default-value
> 
> This could even be combined with the safe de-reference:
> 
>  foo?.bar?.baz ?: computeFooBarBaz()

Elvis operator is a nice feature to have too, but it's something different, I 
just would like to have a property null check equivalent to:

foo?.bar?.baz != null

or

foo?.bar?.baz?

Some logic is related to a condition when property is null or not.

> BTW, existing syntax would do fine for you
> 
> <t:if test="! foo?.bar?.baz">
>  <!-- Renders if foo, bar or baz is null or baz is falsey. -->
> </t:if>

IMHO "baz" is converted to a boolean by converting it to a string first, I 
don't like an idea of toString called here.

Denis



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to