velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mail.lt>
Subject Re: Maps
Date Sat, 31 Aug 2002 05:25:12 GMT

It is usefull for  this :
 $myMap[ "My  key" ]
or
#set (  $key = "My  key"  )
$myMap[ $key ]
it is not bad to use "get", but this kind of arrays are very usual in almost
all
scripting languages, it is supported in  PHP, CFML  and languages like
C#,object pascal
have something more advanced ( indexed properties ).


> Daniel Rall <dlr@finemaltcoding.com> writes:
>
> > "Juozas Baliuka" <baliuka@mail.lt> writes:
> >
> > > $myMap[ "key" ]
> > > $myMap[ $var ]
> >
> > This array index syntax is not supported, as the $myMap object is not
> > an Array object.
>
> Being very familiar with Perl and Python, I realize that other
> languages do support this sort of syntax for hash lookups.  As
> Velocity is quite Java-centric and has so far explicitly avoided
> anything resembling Perl, I wouldn't really be in favor of adding
> anything like that, either.
> --
>
> Daniel Rall <dlr@finemaltcoding.com>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-dev-help@jakarta.apache.org>
>


--
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