Re: [Foo new] vs [[Foo alloc] init]:
Re: [Foo new] vs [[Foo alloc] init]:
- Subject: Re: [Foo new] vs [[Foo alloc] init]:
- From: David Catmull <email@hidden>
- Date: Fri, 15 Feb 2008 13:47:02 -0800
On Feb 15, 2008, at 1:20 PM, email@hidden wrote:
Well, 'new' is a reserved word in C++, so if you use Cocoa's 'new'
method you'll never be able to use Objective-C++ with that code. It's
kind of like how using 'id' as a variable name in C++ is a bad idea.
Actually, that's not true. You can use C++ keywords as method names in
Objective-C++; I've done it (specifically +class) without problems.
Method names just aren't treated quite the same as other identifiers.
The only thing is the syntax colorer highlights them as keywords.
--
David Catmull
email@hidden
http://www.uncommonplace.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden