Re: What is "A class which must be subclassed" ?
Re: What is "A class which must be subclassed" ?
- Subject: Re: What is "A class which must be subclassed" ?
- From: "Michael Ash" <email@hidden>
- Date: Sun, 19 Oct 2008 10:19:06 -0400
On Sat, Oct 18, 2008 at 11:28 PM, Jerry Krinock <email@hidden> wrote:
> On 2008 Oct, 18, at 18:16, Michael Ash wrote:
>
>> The question is ... does it make *sense* to create [an instance of the
>> base class Foo].
>
> The answer is no.
>
>> If the answer is no, then it's an abstract class.
>
> Is my answer a ^sufficient^ condition so that I can state in my
> documentation that "Foo is an abstract class" ?
I think there are two conditions needed: is it pointless to
instantiate Foo, and is Foo designed to stop being pointless if it's
subclassed? Then you have an abstract class.
(An example of something that's pointless to instantiate but not
designed to be subclassed would be a Java-style utility class, where
the class is only used to expose function-like entities as
class/static methods.)
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden