Subject: Re: Is "-init" really needed?
> On Aug 8, 2017, at 10:12 AM, Steve Mills <[email protected]> wrote:
> It's a term that's part of the language, so use it. I know what language I'm
> typing in, so I'm not going to confuse [NSThing new] with "new
> CPlusPlusClass". Even if I did lose my mind and not understand what I'm
> typing, the compiler would point out my mistake.
When I see [foo new] I think C++.
When I see [[foo alloc] init], I think obj-C.
I recently had a case where I needed alloc alone and init’ed the object later.
The necessity arose out of some cruft with querying bundle instances and I had
manage my own list of bundles. Just querying a bundle by ID gave a new instance.
Cocoa-dev mailing list ([email protected]
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 protected]