velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <>
Subject RE: null support
Date Sat, 04 Dec 2004 18:29:04 GMT
> 1. The word "null" should be treated as null in Velocity 
> specific content.
+1, although, like Nathan... I'm also a little nervous with a View layer
'knowing' about nulls. But I think it's a necessary evil, and already there
with lots of workarounds. So I'm in favor of making it clearer. 

> 2. The "set" directive should accept null value as the RHS.
> 3. The "foreach" directive should set null when the element is null. 
> Currently, it preserves the last element.
+1 -- the current behavior always seems to 'surprise' people, myself
included. I'd rather see nulls behave more like people expect.

> 4. The "if" directive should be able to compare references with null.
> #if ($foo == null)
+0 ... I am not sure I want to tell my template folks about "null" ;-)

What would happen for these cases?
#if ($!foo == null) 

Would position have any effect (i.e. like in Java to avoid NPE's) ?
#if (null == $not_in_context)
#if (null == $!not_in_context)

P.S. Shinobu -- nice job on the summarization of the issue and proposed

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message