commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@btopenworld.com
Subject Re: chop/chomp/slice - how to deprecate?
Date Mon, 17 Mar 2003 16:18:21 GMT
I don't know perl at all, so I can't comment on the detail of the changes. However, we must
provide a deprecation route as best we can. Either:

1) deprecate methods within StringUtils
2) create a new utils class - StringPerlUtils to provide Perl-like string functions

The Gump route doesn't work, as we have many users who are non-jakarta and just like [lang]
;-)

Stephen

>  from:    Alex Chaffee / Purple Technology <guru@stinky.com>
> I've made a first pass at reworking chop and chomp, so that:  
> 
> * chop works like perl (always remove last character)
> 
> * chomp works like perl (remove last character only if it's a newline)
> 
> * chopNewline is deprecated with a message "use chomp instead"
> 
> * all the previously named "chomp" functions are renamed "slice":
> 	slice, slicelast, getslice, preslice, getpreslice
> 
> Henri, is this an acceptable name change?
> 
> Before I check it in, I'd like some consensus on the deprecation
> strategy.  We've renamed some methods, and also changed the behavior
> of an existing method -- slighly, but significantly.
> 
> Do we...
> 
> * Check it all in as is, and just make sure to document the changes in
> the readme for the next release?
> 
> * Put in stub implementations for the old chomp* functions and mark
> them with a @deprecated tag?
> 
> * Contact anyone who's using them -- I'm thinking about Gump, and its
> concept of dependencies between Jakarta projects -- If so, how would
> we locate all these users?
> 
> 
> If anyone wants to see my changes, let me know and I'll send you a
> patch file.
> 
> -- 
> Alex Chaffee                               mailto:alex@jguru.com
> Purple Technology - Code and Consulting    http://www.purpletech.com/
> jGuru - Java News and FAQs                 http://www.jguru.com/alex/
> Gamelan - the Original Java site           http://www.gamelan.com/
> Stinky - Art and Angst                     http://www.stinky.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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


Mime
View raw message