Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple should get behind Cocoa Java



On 25/08/2006, at 1:59 AM, Hsu wrote:

Delegation is distinct from interfaces & far more powerful. It is part of the runtime as you mentioned, but Cocoa==Obj-C like JavaVM==Java. Java actually took the concept of interfaces from Objective-C where they are called protocols.

I never said that delegation and interfaces are the same thing. I said that delegation can be implemented using interfaces.

IMHO, Interfaces are a poor way to implement delegation; once fixed they cannot be easily extended without breaking client code.

Well interfaces are just really the poor man's multiple inheritance, although the argument for interfaces and against MI is claimed to be theoretical. Thing is that, like Karl says, if you want to add something to the interface then every implementing class has to be changed. In practice, it would be much easier, to add to a real class a default method, so that implementing classes would not be affected.


Ian

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Apple should get behind Cocoa Java (From: Wagner Truppel <email@hidden>)
 >Re: Apple should get behind Cocoa Java (From: Hsu <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.