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

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
  • Comment on Re^3: Private and Protected class methods

Replies are listed 'Best First'.
Re^4: Private and Protected class methods
by chromatic (Archbishop) on Sep 07, 2006 at 17:31 UTC

    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.