MLUG: Re: [MLUG] guess what
Re: [MLUG] guess what
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
> One reason I haven't read the whole thing is that my feelings on OO 
> are that people way over-use inheritance when (say) composition is 
> what they really want.

And Damien doesn't forget to mention that this is often quite easy to do in
Perl, and sprinkles his book liberally with examples.

However, the sections on 'tie' will twist yer noodle. I think it's a fancy way
to say that Perl has "interfaces" the way Java does. Except Perl had them in
Perl5. But since Perl doesn't have the "multiple inheritance" problem that Java
has, they're not as necessary (or useful) as they are in Java.

IMHO, composition is easier to use, as a programmer, because the OO-ness of Perl
is not forced upon you, and is actually optional.

And the concept of building up hashes of hashes and other composite data
structures is quite easy for Perl programmers to add references to the things
hash elements can contain.

Java, OTOH, completely de-emphasizes the usefulness of composition, in part
because of its fascination with the inheritance tree and all that syntactic
sugar that looks so glamorous throughout your code. Composition in Java just
isn't sexy code. "My method signature is bigger than yours" is, in Java-land.

Mike/



---------------------------------------------
http://www.valuenet.net


_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members