agreed on all points. yet, i'll add this last thought... on these methods we're talking about throwing out, rather than just send them into ether, perhaps we can keep them around on the wiki here or somewhere in case someone does need/want them. then i'll just check in a trimmed-down version for now.
On Mon, 28 Mar 2005 18:00:09 -0800, Shinobu Kawai <[EMAIL PROTECTED]> wrote: > Hi Nathan, > > > > clone() isn't public in List, so I guess I'll need to skip the first > > > step. > > > > oh yeah. hmm. so why are we putting it in this tool by default? is > > this something you are (or someone else is) using (or has requested)? > > if not, then i think we shouldn't be trying to implement it yet. > > YAGNI, ya know? > > Let's see, I know it wasn't in the original version... > This method was originally in the PublicFieldUberspect. I moved it > here with the length method to put all the array stuff in ArrayTool. > (Did you know you can't call array.clone() inside VTL?) Anyways, I > haven't heard of anyone actually using/needing it, so I guess I can > throw it away for now. YAGNI. > > > > Which brings up another question: Do we want support for other List > > > methods, like contains() and isEmpty()? (These two are the only ones > > > I've ever called from a template.) > > > > good question. and i think the answer is yes. i don't use contains() > > much, but i do use $list.isEmpty() a lot. if we're gonna offer this > > as (among other things) a way to hide the difference between arrays > > and lists in a template, then we should probably support these. > > Okay, I'll put them in. Other methods available upon request. ;) > > > > Arrays.asList() only works for Object arrays. We might be getting > > > primitive arrays as well. I used to have a whole bunch of > > > instanceof's. > > > > ah. yeah, that makes sense. i figured i was missing something. my > > only question, then, is should we have this return fixed-size lists > > like Arrays.asList() does? honest question. my first instinct is to > > say that it should, but i'm really not sure if that's important (or > > even just worth the effort) here. > > I also wonder if anybody wants this method. I was only using it > internally at first. Now, I'm not using it anywhere. YAGNI applies > here, too. > > Best regards, > -- Shinobu > > -- > Shinobu Kawai <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]