in reply to Re^3: OO in Perl 5: still inadequate
in thread OO in Perl 5: still inadequate

Not every class is subclassable (although it would be nice if they were), knowledgable or otherwise. Some people do odd things like blessing an object into a hard-coded class (so you don't get to decide which class the object ends up in), have some factory-like behavior going on where the object ends up in a particular class, and lots of other things. Lots of code I see doesn't pass the null-subclass test.

If you're doing weird wrapper or adapter things, you really aren't subclassing.

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

Replies are listed 'Best First'.
Re^5: OO in Perl 5: still inadequate
by fergal (Chaplain) on Jan 21, 2006 at 14:15 UTC

    Yes. There's an implicit requirement on the classes we're discussing to be subclassable in the first place, otherwise the discussion is pointless. We may as be talking about the number of vertices in polygons and allowing polygons to include circles.

    s/\bclass\b/class (which must be subclassable to start with)/g

      If you limit the set of classes your claim applies to, you can't use the word "any". Your bold claim is too bold :)

      --
      brian d foy <brian@stonehenge.com>
      Subscribe to The Perl Review