• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is "A class which must be subclassed" ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >What is "A class which must be subclassed" ? (From: Jerry Krinock <email@hidden>)
 >Re: What is "A class which must be subclassed" ? (From: "Michael Ash" <email@hidden>)
 >Re: What is "A class which must be subclassed" ? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: what do you use to make icons and similar?
  • Next by Date: Re: Views, frames, and bounds
  • Previous by thread: Re: What is "A class which must be subclassed" ?
  • Next by thread: NSAlert?
  • Index(es):
    • Date
    • Thread