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 46548 invoked from network); 2 Aug 2003 00:09:39 -0000 Received: from zinc.btinternet.com (194.73.73.148) by daedalus.apache.org with SMTP; 2 Aug 2003 00:09:39 -0000 Received: from host81-128-53-32.in-addr.btopenworld.com ([81.128.53.32] helo=oemcomputer) by zinc.btinternet.com with smtp (Exim 3.22 #23) id 19ijxz-0002Jp-00 for commons-dev@jakarta.apache.org; Sat, 02 Aug 2003 01:09:47 +0100 Message-ID: <002301c3588a$80fb7480$20358051@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: <20030801185626.16922.qmail@web41713.mail.yahoo.com> Subject: Re: [lang] StringUtils overlay/concatenate/getNested Date: Sat, 2 Aug 2003 01:10:38 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N OK, commits are - overlayString --> overlay with better defined semantics/tests for odd cases - getNestedString --> substringBetween a much better name - concatenate --> join join being too well established to change, but concatenate being just strange on its own Stephen ----- Original Message ----- From: "Phil Steitz" To: "Jakarta Commons Developers List" Sent: Friday, August 01, 2003 7:56 PM Subject: RE: [lang] StringUtils overlay/concatenate/getNested > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org >