velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <tcol...@cisco.com>
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.
+1
> 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)


Cheers,
Tim
P.S. Shinobu -- nice job on the summarization of the issue and proposed
changes! 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message