Re: OOP and Foundation 3: Protocols and collections
Re: OOP and Foundation 3: Protocols and collections
- Subject: Re: OOP and Foundation 3: Protocols and collections
- From: Ondra Cada <email@hidden>
- Date: Mon, 10 Jun 2002 23:30:58 +0200
On Monday, June 10, 2002, at 10:39 , Michael Gersten wrote:
As soon as you want to have some concept of generic collections, you'll
also want some concept of generic mutable collections.
But now the class hierarchy becomes undrawable. A concrete example:
NSMutableString needs to inherit from both NSString and generic mutable
collection.
There's absolutely no need to fix all behaviours in inheritances (be it
class inheritance or protocol inheritance), since we, lucky us, got a real
polymorphism.
As a matter of fact, NSMutableString needs to *respond to* generic string
and generic (mutable) collection messages. No need on earth to inherit
from this or that.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.