[Chicago-talk] error reporting in overridden method

Jim Thomason thomasoniii at gmail.com
Mon Sep 20 08:50:21 CDT 2004


> This is the source of your problems.  If you aren't doing
> everything the parent did, you're not properly subclassing.

I disagree, there are times when you do not want to do what the parent
did. For an extreme example, a placeholder abstract method in the
parent that does nothing other than die and say "method not
implemented".
 
>   Parent->validate1, Parent->validate2, Parent->validate3

...which is what I suggested in my email. Except, of course, that it
would actually be:

Parent->some_method

turning into

Parent->some_method calling:

Parent->valid_args_for_some_method, Parent->do_logic_for_some_method

And I still dislike that approach because it creates a whole mess of
additional methods and generally pollutes up the namespace. I'm not
saying it doesn't work, just that I find it aesthetically displeasing.

Hence, I was curious if anybody had a more elegant approach.

-Jim.....


More information about the Chicago-talk mailing list