Re: And now for my next question(s)...
Re: And now for my next question(s)...
- Subject: Re: And now for my next question(s)...
- From: "John C. Randolph" <email@hidden>
- Date: Fri, 6 Jul 2001 01:11:12 -0700
On Friday, July 6, 2001, at 01:22 AM, Simon Stapleton wrote:
Is there a preference for subclassing or categorising - either would
work, in my view.
It's largely a matter of taste, but...
I write a subclass when I need to add an ivar, or *alter* some behavior
of the parent class. (i.e, override a method.) I will also write a new
class when the methods I want to write are very different conceptually
from the parent class. If I just want to *add* to the functionality of
a class, then I write a category.
-jcr
For every complex problem there is an answer that is clear, simple, and
wrong. -- H L Mencken