[
https://issues.apache.org/jira/browse/JEXL-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797798#action_12797798
]
Alfred Reibenschuh commented on JEXL-79:
----------------------------------------
why not got with php for array handling:
http://us2.php.net/manual/en/language.types.array.php
listObject=[1,2,3] -- will create a object[]
listArray=[1,2,3,...] -- will create an ArrayList
listMap=[1=>"some",2=>"any",3=>"thing"] -- will create a HashMap
listHash=[1=>"some",2=>"any",3=>"thing",...] -- will create a TreeMap
list[]="other" -- will java call like list.put(list.size(),"other") or
list.put(list.lastKey()+1,"other")
list["some"]="any" -- will java call like list.put("some","any")
> Add support for growable arrays (ArrayLists)
> --------------------------------------------
>
> Key: JEXL-79
> URL: https://issues.apache.org/jira/browse/JEXL-79
> Project: Commons JEXL
> Issue Type: New Feature
> Reporter: Sebb
> Assignee: Henri Biestro
> Fix For: Later
>
> Attachments: JEXL-79.patch, JEXL-79.patch, JEXL-79.patch
>
>
> JEXL now has fixed arrays. Trying to access a non-existent entry generates an
> Exception.
> Might be useful to allow for the creation and manipulation of growable
> arrays, e.g. using ArrayList.
> Writing to a non-existent entry should just create the value; reading should
> return null and empty.
> This would need a new syntax.
> Perhaps:
> list=[1,2,3,...]
> and
> emptyList=[...]
> I did wonder about using (), but that would clash with method invocation.
> Other ideas welcome!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.