Re: What's with this "new"?
Re: What's with this "new"?
- Subject: Re: What's with this "new"?
- From: Mark Patterson <email@hidden>
- Date: Mon, 26 Jul 2004 23:59:52 +1000
On 25/07/2004, at 11:51 PM, Finlay Dobbie wrote:
On 25 Jul 2004, at 13:24, Mark Patterson wrote:
I noticed something that I hadn't seen in Hillegass: the +new method,
roughly equivalent to [[SomeClass alloc] init]. Is that a new thing,
or an old thing? Why does Hillegass do in 2 steps what could be done
in one?
+new is old and not really recommended. There have been discussions on
this in the past, search the archives.
I've just had a look at
http://lists.apple.com/archives/cocoa-dev/2002/Feb/10/
memorymaniarevisted.001.txt
It seems to suggest that +new is not deprecated, but alloc init is
clearer for beginners. So I don't think I should feel too dimodi to use
it if I think it makes the code more readable.
Regards,
Mark
_______________________________________________
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.