FROM : Adam P Jenkins
DATE : Fri Apr 18 15:56:38 2008
On Apr 18, 2008, at 1:16 AM, Graham Cox wrote:
>
> Here's a simple example:
>
> - (void) dealloc
> {
> [someIvar release];
> [super dealloc];
> }
>
>
>
> is <someIvar> really initialised? Maybe it's nil? Do I care at this
> point? no - either way, the code is correct - if the object was
> made, it's released, if it wasn't, it's a no-op. Exactly what you
> want.
That makes a lot of sense. I can now picture many lines of code I've
written over the years which wouldn't have been necessary with this
feature.
Thanks a lot to everyone who responded to my question. I now
understand the pros and cons of the nil-eats-messages feature much
better, and it doesn't seem like a mis-feature to me now.
Adam
DATE : Fri Apr 18 15:56:38 2008
On Apr 18, 2008, at 1:16 AM, Graham Cox wrote:
>
> Here's a simple example:
>
> - (void) dealloc
> {
> [someIvar release];
> [super dealloc];
> }
>
>
>
> is <someIvar> really initialised? Maybe it's nil? Do I care at this
> point? no - either way, the code is correct - if the object was
> made, it's released, if it wasn't, it's a no-op. Exactly what you
> want.
That makes a lot of sense. I can now picture many lines of code I've
written over the years which wouldn't have been necessary with this
feature.
Thanks a lot to everyone who responded to my question. I now
understand the pros and cons of the nil-eats-messages feature much
better, and it doesn't seem like a mis-feature to me now.
Adam






Cocoa mail archive

