• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is "-init" really needed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is "-init" really needed?


  • Subject: Re: Is "-init" really needed?
  • From: Jeff Szuhay <email@hidden>
  • Date: Tue, 8 Aug 2017 10:35:04 -0700

> On Aug 8, 2017, at 10:12 AM, Steve Mills <email@hidden> 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.

Completely agree.
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
to
manage my own list of bundles. Just querying a bundle by ID gave a new instance.
_______________________________________________

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

  • Follow-Ups:
    • Re: Is "-init" really needed?
      • From: Steve Mills <email@hidden>
References: 
 >Is "-init" really needed? (From: David Hoerl <email@hidden>)
 >Re: Is "-init" really needed? (From: Jens Alfke <email@hidden>)
 >Re: Is "-init" really needed? (From: じょいすじょん <email@hidden>)
 >Re: Is "-init" really needed? (From: Carl Hoefs <email@hidden>)
 >Re: Is "-init" really needed? (From: Uli Kusterer <email@hidden>)
 >Re: Is "-init" really needed? (From: Alex Zavatone <email@hidden>)
 >Re: Is "-init" really needed? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Is "-init" really needed?
  • Next by Date: Re: Is "-init" really needed?
  • Previous by thread: Re: Is "-init" really needed?
  • Next by thread: Re: Is "-init" really needed?
  • Index(es):
    • Date
    • Thread