>> fly2never wrote:
>>    name = [NSString string];
> 
>> because sending a method to nil is perfectly safe, unlike C++.

> Ah! No! That's not a blanket guarantee! It is only valid for methods that 
> return void, integer types or pointers. If your method returns a struct and 
> you send it to NIL, you get garbage back.

Yeah, sorry. I was just thinking of the sending part of it which doesn't need 
the guards against nil that are necessary in C++; using the result is a 
different matter. 
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to