Re: Cocoa-dev Digest, Vol 4, Issue 496
Re: Cocoa-dev Digest, Vol 4, Issue 496
- Subject: Re: Cocoa-dev Digest, Vol 4, Issue 496
- From: Daniel Child <email@hidden>
- Date: Thu, 24 May 2007 23:14:20 -0400
I am also lost on the actual implementation. My interest is to try to
take a number of evidently useful Java-coded Design Patterns and see
if I can convert them to Obj-C as a way to learn the idiom. I quickly
got stuck. I started with the Factory Pattern.
In the Java case, using the interface involves sleight of hand.
Callers will always behave as if they are dealing with an instance of
AbstractThing (the top class) but in fact will be dealing with one of
the lower classes (ConcreteA or ConcreteB). And type-casting is
involved, as the lower classes recast their own object as the top
class so that it preserves the public interface. Is this used in Obj-
C as well for this kind of case?
On May 24, 2007, at 6:45 PM, email@hidden wrote:
To come back to the original post... I was also wondering how the
'class-cluster' were implemented...
Clearly this does not require that the top class is abstract. Still I
have troubles to understand how the allocation/init works for these
cluster classes.
Can anyone provide an example ?
Thanks in advance.
Serge.
PS : To be even more precise, I'm one of those that "DoNotKnowOrCare"
concerning abstract class; though I do care a lot of class cluster as
a interesting concept.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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