Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
- Subject: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
- From: Brent Gulanowski <email@hidden>
- Date: Fri, 4 Jun 2004 11:24:34 -0400
On Jun 3, 2004, at 6:00 PM, Marcel Weiher wrote:
>
>
> If the original contained something (say, a newspaper with
>
> images), the contents of the copy does not change when the contents of
>
> the original changes. That's why it is called a *copy*.
>
>
Welcome to programming with *references*! :-))
>
This is somewhat specious, regardless it being correct. It is quite
possible to add a semantic abstraction over top of a language where it
does not already exist. All languages in fact simply do this to the
machine language anyway.
If you are saying that the semantic abstraction of value passing is
only partially implemented (and I think that is what you are accusing
Apple of), then that is a different thing.
In the case of a Cocoa collection like NSArray, are you saying that
using by-value semantics for -copy would be wrong because
-insertObject:AtIndex: (amongst others) uses reference semantics, or
are you saying that it would be wrong to re-design NSArray to adhere
fully to by-value semantics due to the by-reference nature of
Objective-C? In other words, where's the inconsistency: the interfaces
of the class to one another, or the class design Ondra is expecting and
the language it is in? Or between different classes? Or all three?
I'll accept the first easily, but need more convincing of the
class-versus-language conflict, if someone is willing. If Cocoa were
completely re-written with by-value semantics, would that be "bad"? Is
there an inherent technical (vs. philosophical) problem with using both
by-value and by-reference semantics if the difference is clear and
logical? All that really matters is that the contract is adhered to,
surely? Does Objective-C make some contractual promises in fact
impossible?
Various arguments keep throwing out the bon mots (and the same ones)
instead of making a complete argument. Perhaps said argument exists
elsewhere and is accessible? (Forgive me if it's been posted in the
past and I missed it.)
--
Brent Gulanowski email@hidden
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.