velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: #set silently fails if RHS is null
Date Thu, 08 Nov 2001 19:15:05 GMT
On 11/8/01 1:53 PM, "Sean Legassick" <sean@informage.net> wrote:

> In message <B80F7D2C.A325%geirm@optonline.net>, Geir Magnusson Jr.
> <geirm@optonline.net> writes
>> If no one really objects, I can add this as a default-off switch to allow,
>> when turned on, a null value on the RHS to remove the reference from the
>> context, so things will behave as you expect.
> 
> I personally don't like the idea of using a configuration parameter to
> determine language semantics. It seems a potential cause of nasty
> hard-to-track bugs when moving templates from one site to another for
> example.
> 
> Is there actually any reasonable use of the non-removing semantics? That
> is, does anyone really write templates that take advantage of a #set
> failing where the RHS is null? If not why not just change the behaviour
> so at least it keeps VTL semantically consistent for a given release of
> Velocity.


The problem is that this is a 180 degree switch, so it won't do to just
throw it in there.  By adding a switch, we can play with it and see if it
really solves problems, and it prevents things from going haywire for people
if they get a new nightly or something for a bugfix.

I say 'play with it' because the problem can easily be worked around via a
tool, but that makes for funny templates.

One solution is adding an event handler to let the programmer make the
decision...

Hm.

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



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


Mime
View raw message