[stringtemplate-interest] handling of arrays

Terence Parr parrt at cs.usfca.edu
Sat Jan 27 15:37:48 PST 2007


On Jan 16, 2007, at 9:40 PM, John Snyders wrote:

> I noticed in ASTExpr.java the method convertArrayToList.

it is.  just done to make things consistent...else have to check for  
arrays everyone.  gross, eh?

> It seems to me that this is wasteful. I have not looked at it too  
> deep but why not handle arrays like other collections and wrap them  
> in an ArrayIterator inside convertAnythingIteratableToIterator.

Interesting...ArrayIterator, eh?  Does Sun have a standard one?  I  
don't see it.  Do you mean I should create one real quick?

Ter



More information about the stringtemplate-interest mailing list