Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If inheritance was as important in design as generally seems to be believed, then CPAN would consist mostly of derived classes, with only a relatively small number of base classes.

    Perhaps you would, if CPAN modules generally had good design (I'm not willing to make that assumption in general) or if module authors were truly egoless programmers (I point you to templating systems, argument processing modules, web frameworks, class creation modules...).

    Polymorphism is useful only when you have a subclass...

    Untrue. Allomorphism is polymorphic equivalence between two entities unrelated by inheritance and it works.

    Perhaps the worst sin of most OO teachings is that they conflate inheritance with polymorphism, as if inheritance were important and polymorphism merely a side effect.

    • Very True. JavaScript and other prototype-based languages are good examples of languages that implement a very extreme form of polymorphism without even supporting language-level inheritance.