• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mutability
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutability


  • Subject: Re: Mutability
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 22 Nov 2001 19:58:09 +0100

Erik,

>>>>>> Erik M. Buck (EMB) wrote at Wed, 21 Nov 2001 17:05:44 -0600:
EMB> If an object is advertised as immutable then that immutability should be
EMB> respected even if the object is actually mutable.

That's right, but what has it to do with the fact that if the object is
*NOT* advertised as anything but an object -- ie. id, the basic ObjC type! --
then there seems to be no (decent*) way to get its real class in runtime.
That's a bug.

(*) The trick of mutable=YES; NS_DURING [array addObject:@""]; [array
deleteLastObject]; NS_HANDLER mutable=NO; NS_ENDHANDLER is nice, but too much
on the hackish side to be treated as a decent solution!
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Mutability
      • From: Andrew Pinski <email@hidden>
References: 
 >Re: Mutability (From: email@hidden)
 >Re: Mutability (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Dynamically creating a class
  • Next by Date: Re: all apps to open one file
  • Previous by thread: Re: Mutability
  • Next by thread: Re: Mutability
  • Index(es):
    • Date
    • Thread