I think it's an interesting problem. One one hand, we can't go about
putting each and every string manipulating method onto String or
various StringWrappers, on the other hand we have a real reusability/
discovery problem with the static helper method alternative. I suspect
there are custom DateUtils and a StringUtils in play at most companies
and that's hardly leveraging much.

Facets or extension methods could really improve this aspect a lot,
though I suspect that will merely shift the debate elsewhere (people
in here don't usually like such constructs as it "harms readability").

/Casper

On Sep 24, 1:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I've seen the anti-helper class/anti-static meme pop up every once in
> awhile.  And now it's raging where I work.  The argument seems to boil
> down to "static methods aren't OO."  Given all the attention that
> functional languages has gotten, I had thought most people had moved
> on from trying to fit everything into a pure OO model.  IMO a static
> method is simply a functional construct and there are times where it's
> the simplest, cleanest way to deal with a problem (e.g. the methods in
> Apache Commons StringUtil 
> class:http://commons.apache.org/lang/api/org/apache/commons/lang/StringUtil...).
>
> So I'm curious, what is the latest thinking on this subject?  Anyone
> have any best practices around when to use a static method and when
> not to?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to