velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nat...@esha.com>
Subject Re: [PATCH] Map Support
Date Wed, 30 Oct 2002 05:28:57 GMT
Geir said:
> I like it. I was thinking of doing this anyway.  We do it for lists - I
> can't think of a good reason why we won't for a Map.
>
> There is no way to setup a static map of things w/o having the controller
> support it, which would be a drag for something like a VM.
>
> If there are no objections by tomorrow, I'll review the patch and get it
in
> there.  Not sure I'm overjoyed with the syntax though.  Any other
> suggestions?  Like :
>
>    #set($mymap = [ {"foo", $a}  {"bar", "c"} ]

+1

however, would this support only explicit strings as keys (e.g. 'foo' or
"bar")?
we should be clear on what will be supported for keys and values.  what
about more creative variations?

#set( $mymap = [ { $foo, $a}
                            {   $bar   ,34}
                            {14 ,true}
                            {"$woogie", [1,'two',$three]}
                            {  $tool.arbitraryObjectOrPrimitive ,
!$trueVar }
                         ] )

not that i need, want, or even approve of all of these...  i just think this
stuff should be addressed one way or another.

> Or maybe a comma between the {}?

-1   unnecessary.  your suggestion is readable and simple as it is; more
commas would just clutter things up.  having commas serve two purposes in
the same #set syntax is a bad idea.  keep it simple and clear.

Nathan Bubna
nathan@esha.com


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


Mime
View raw message