by acqq · 14y ago · 0 comments
http://www.csis.pace.edu/~bergin/patterns/ppoop.html
I can only read it as a joke -- the title is almost 'poop' and it's insane to write all the classes instead of the initial few lines. But I really see that one of the authors has more 'OOP forewa' articles where he's fully serious:
Don't be so sure!
POOP is the accepted term for Perl Object-Oriented Persistence - without any trace of irony, as far as I have ever been able to tell.
Do read the paper! Note that I would consider an elegant solution this (string literals replaced with the names of them):
static void judge()
{
String s = System.getProperty( p );
if ( s.equals( t11 ) || s.equals( t12 ) ) {
return m1;
} else if ( s.equals( t21 ) || s.equals( t22 ) ) {
return m2;
}
return m3;
}
public static void pjudge()
{ System.out.println( judge() ); }
Then read what they produced instead.