Re: Mutable class problems
Re: Mutable class problems
- Subject: Re: Mutable class problems
- From: Ondra Cada <email@hidden>
- Date: Tue, 25 Jun 2002 13:45:36 +0200
On Tuesday, June 25, 2002, at 05:47 , Rosyna wrote:
The dictionary contains a set of NSNumbers. If the input is Mutable, I
will use and perform calculations on the numbers and use it if it is not
NULL. If the collection is immutable, I will check to see if it is NULL
and then create a new dictionary. If it is not NULL and immutable I
return paramErr.
You'd have to use OpenStep/GNUStep for that. Apple thinks this approach is
invalid, and made the CoreFoundation thing so that it is next to
impossible. More precisely, Chris Kane says that using the object's class
to determine what to do with the object is improper, since, as he written
to me a year ago when I've asked: "The code is trying to cheat its way out
of saving a few more bits of information by using the type system, but in
an invalid way."
We can disagree with that (I do, for one), but that's more or less all we
can do (unless we want to abandon Cocoa and go GNUStep). The plain (in my
personal opinion, wrong) fact is that CoreFoundation uses effectively *one*
*shared* class for more different Foundation-level (or, shall we say,
documentation-level) classes, and that's 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.