in reply to Re: Private and Protected class methods
in thread Private and Protected class methods

What is the problem with this?

Calling isa() and forcing inheritance sucks.

Replies are listed 'Best First'.
Re^3: Private and Protected class methods
by radiantmatrix (Parson) on Sep 07, 2006 at 14:58 UTC

    Why? I mean, I can see the argument for not using protected subs at all, but given that it's a requirement, and that the point of "protected" is that the class and its children (thus, inheritence is implied) can call it, what's the issue with that approach?

    <radiant.matrix>
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet

      Sure, if you have to use inheritance throughout your system and absolutely cannot use any other method of code reuse or polymorphic structure, obviously inheritance is the way to go. That's a little bit circular; this coding style makes inheritance necessary by forbidding the other approaches.

      My point is that I think that's a silly, harmful assumption, nearly as bad as saying that your identifiers cannot use the letter e. isa and ref are code smells to me.