|
From: | David Ayers |
Subject: | Re: alloc/init - copy/mutableCopy |
Date: | Thu, 06 Feb 2003 18:35:11 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 |
Richard Frith-Macdonald wrote:
On Thursday, February 6, 2003, at 04:35 pm, Stéphane Corthésy wrote:Hello,I'm the author of these modifications. Please keep them, as they protect us from changes in mutableCopy/copy implementation in gnustep/base.
Yes I know that's why I cc-ed you :-)
I think perhaps you got left out of the conversation where David (I think) pointed out that this policy of Apples is really broken.
I generally try to keep these discussions public: http://mail.gnu.org/archive/html/bug-gnustep/2003-01/msg00099.htmlBut this one kind of evolved out of side issue :-(..but I think it's time to hit the list.
I'm not sure how to proceed ... At the moment our concrete collection classes all perform shallow copies, but I think our abstract implementations work as the Apple documentation says. This means that in practice, while we conform to the Apple documentation, we are consistent ... however anyone subclassing a collection class will need to override the copy methods to get consistent behavior. Perhaps we should abandon apple compatibility and make the abstract methods implement shallow copies too?
I've also been tossing and turning on this one. On the one hand we *force* GNUstep developers to write compatible code, on the otherhand, we confront people playing with subclassing class clusters with unnecessary issues due to a broken API. And as in this case write overly complicated code. I'm not sure which way to go. But what ever we do, we should document it well and use consistent techniques to create mutable/immutable copies.
Cheers, Dave
[Prev in Thread] | Current Thread | [Next in Thread] |