Re: Is "-init" really needed?

2017-08-08 Thread Uli Kusterer
On 8. Aug 2017, at 18:38, Doug Hill wrote: > As others have mentioned, I too have never seen any evidence or statements > from Apple that discourages +new or -init. Or designated initializers. I never said anything about init or designated initializers. In fact, ObjC

Re: Is "-init" really needed?

2017-08-08 Thread Steve Mills
On Aug 08, 2017, at 12:35 PM, Jeff Szuhay wrote: On Aug 8, 2017, at 10:12 AM, Steve Mills 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

Re: Is "-init" really needed?

2017-08-08 Thread Alex Zavatone
> On Aug 8, 2017, at 12:35 PM, Quincey Morris > wrote: > > I don’t have a problem with using “new” vs. alloc/init, but there are a > couple of technical issues hiding behind this, though in current practice > they make little difference. > > 1. NSObject

Re: Is "-init" really needed?

2017-08-08 Thread Quincey Morris
I don’t have a problem with using “new” vs. alloc/init, but there are a couple of technical issues hiding behind this, though in current practice they make little difference. 1. NSObject has “new” with a standard meaning. That means you can use “new” on any subclass where it’s OK to use the

Re: Is "-init" really needed?

2017-08-08 Thread Jeff Szuhay
> On Aug 8, 2017, at 10:12 AM, Steve Mills 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 >

Re: Is "-init" really needed?

2017-08-08 Thread Steve Mills
> On Aug 8, 2017, at 11:45, Alex Zavatone wrote: > > I see it creeping back in to use with some people, but IMO, new bears too > many references to other languages’ use of new. > > It seems too close to how it would be used in other languages and may imply > things that aren’t

Re: Is "-init" really needed?

2017-08-08 Thread Alex Zavatone
I see it creeping back in to use with some people, but IMO, new bears too many references to other languages’ use of new. It seems too close to how it would be used in other languages and may imply things that aren’t the best. I think it’s a case of, “well in the olden days, new was used for

Re: Is "-init" really needed?

2017-08-08 Thread Doug Hill
As others have mentioned, I too have never seen any evidence or statements from Apple that discourages +new or -init. Or designated initializers. The Objective-C Programming Guide from Apple describes very well all of the above and the reasoning behind using them. Please point to evidence, such

Re: Is "-init" really needed?

2017-08-08 Thread gerti-cocoadev
Unlike with Swift, in Objective-C it is to no small part the developers who drive how the language evolves. +new used to be the canonical initializer in the very olden days. But then folks wanted a better distinction between object allocation and object initialization to make memory management

Re: Is "-init" really needed?

2017-08-08 Thread Steve Mills
> On Aug 8, 2017, at 05:13, Uli Kusterer wrote: > > Apple have gone back and forth on this AFAIR. +new was actually the > pre-retain/release way to create an object. So it has been discouraged since > ... OpenStep, I think? But it was never formally deprecated,

Re: Is "-init" really needed?

2017-08-08 Thread Uli Kusterer
On 8. Aug 2017, at 02:23, Carl Hoefs wrote: > Is the use of +new discouraged also? Apple have gone back and forth on this AFAIR. +new was actually the pre-retain/release way to create an object. So it has been discouraged since ... OpenStep, I think? But it was