commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@seagullsw.com>
Subject RE: [lang] StringUtils overlay/concatenate/getNested
Date Fri, 01 Aug 2003 00:28:12 GMT
I am always for choosing better names.

>- overlayString - shouldn't have 'String' in name. Better named as
'replace'

+1

>- 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

>- 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. ;-)

Gary

-----Original Message-----
From: Stephen Colebourne [mailto:scolebourne@btopenworld.com] 
Sent: Thursday, July 31, 2003 17:12
To: Jakarta Commons Developers List
Subject: [lang] StringUtils overlay/concatenate/getNested

One final pass through StringUtils suggests these method names as dubious

- overlayString - shouldn't have 'String' in name. Better named as 'replace'

- concatenate - does the name as join(array, null) so should be called
join(array)

- getNestedString - poor name, again with String in it.


Any views on changing these names (by deprecation of course)

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message