Re: Subclass
Re: Subclass
- Subject: Re: Subclass
- From: Chris Hanson <email@hidden>
- Date: Sat, 14 Jun 2003 19:01:22 -0500
On Saturday, June 14, 2003, at 03:22 AM, Sailor Quasar wrote:
With all due respect to the Obj-C veterans on these lists, and
aplogies for cross-posting to cocoa-dev, the functionality requested
by the original poster of this thread is one of several minor OO bits
that C++ has but Obj-C does not that I feel would be better off there:
These are not actually required for a language to be object-oriented.
(Unlike dynamic binding of messages to methods, which C++ doesn't
provide and Java only provides if you use reflection.) Though I think
class variables (#3) would be a good addition to the language, since
it's one of the few Smalltalk features missing from Objective-C.
1. As noted, enforcement of pure virtual base classes.
You mean "abstract base classes." These are better enforced by raising
an exception in +allocWithZone: if it's the abstract class that's being
instantiated. Your unit tests will catch the exception and give you a
red bar. (You do use unit testing, don't you? OCUnit is cool.)
2. The ability to declare methods protected or private
These are nonsensical in a true object-oriented language; since you can
send any message to any object at any time, there is and can be no
enforcement of protection.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: Subclass (From: Sailor Quasar <email@hidden>) |