Return-Path: Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 36372 invoked from network); 1 Aug 2003 18:56:21 -0000 Received: from web41713.mail.yahoo.com (66.218.93.130) by daedalus.apache.org with SMTP; 1 Aug 2003 18:56:21 -0000 Message-ID: <20030801185626.16922.qmail@web41713.mail.yahoo.com> Received: from [12.10.219.46] by web41713.mail.yahoo.com via HTTP; Fri, 01 Aug 2003 11:56:26 PDT Date: Fri, 1 Aug 2003 11:56:26 -0700 (PDT) From: Phil Steitz Subject: RE: [lang] StringUtils overlay/concatenate/getNested To: Jakarta Commons Developers List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N FWIW, I agree with all of Henri's views, except that I am more +1 on the concatenate -> join change. To me, concatenate connotes a binary operation (like +), but StringUtils.concatenate is an array operation. I like join better. Phil --- Henri Yandell wrote: > > > On Thu, 31 Jul 2003, Gary Gregory wrote: > > > I am always for choosing better names. > > Many of these names are my fault, as with much of StringUtils, and I'm > loving that the community part of open-source is paying off for me. > Smarter people are looking at my ideas with a different perspective and > massively improving them. Quite humbling in fact. > > > >- overlayString - shouldn't have 'String' in name. Better named as > > 'replace' > > But we already have a replace method? Unless I'm on crack, the > functionalities are quite different. Overlay takes a text and effectively > replaces based on a set of indexes, rather than replacing characters. > > +1 to removing String > -0 to replace > +0 to another name than 'overlay' > > > >- concatenate - does the name as join(array, null) so should be called > > join(array) > > > > I cannot say I am fond of the whole 'join' terminology. It seems to > > math-like for String objects (as opposed to Sets). Since strings are > 'added' > > together with '+', has 'add' been proposed? Not a great choice I know. > > > > +0 > > My only problem with join is something someone pointed out to me not long > after I accepted that 'join' was more Java than the explode/implode I'd > used elsewhere. They pointed out that Java already has a join method on > every Object. So in effect we're overloading a threading method. Kinda. > > Having join(array) makes more logical sense, but I also think that people > might be looking for a 'concat' style of function. > > +0 too. I feel people will complain, but it does seem the right choice. > > > >- getNestedString - poor name, again with String in it. > > > > 'Nested' seems wrong to me. This is just a 'substring'-type of > operation, > > how about 'substringBetween'? We already have 'substringAfter' and > > 'substringBefore', so this seems to fit just, well, just between. ;-) > > +1 to substringBetween. > > It's not sexy, but it does help to group the method nicely with the > substring collection. > > Hen > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com