commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <>
Subject [jira] Commented: (JEXL-79) Add support for growable arrays (ArrayLists)
Date Sun, 09 Aug 2009 20:48:14 GMT


Henri Biestro commented on JEXL-79:

We could use a TreeMap for built-in ordering on Integer keys.
But as a "glue" to Java objects & methods, that would be odd and/or may involve transforming
the TreeMap to ArrayList or Object[] on the fly which would be worse imo...

Or we could use the syntax to instantiate a user-definable List class in the Interpreter (could
extend this to Map too) so the behavior wrt to holes / extension would be left open.

> Add support for growable arrays (ArrayLists)
> --------------------------------------------
>                 Key: JEXL-79
>                 URL:
>             Project: Commons JEXL
>          Issue Type: New Feature
>            Reporter: Sebb
>             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
> 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.

View raw message