On Oct 7, 2009, at 9:53 AM, Derek Chesterfield wrote:
Just an aside, but does either syntax got optimised by the compiler
(GCC or LLVM). Obviously it can't in all cases, but this seems an
obvious case where it could be replaced by an assignment.
Message sends can never be optimized away by
On 7 Oct 2009, at 18:19, BJ Homer wrote:
On Wed, Oct 7, 2009 at 10:53 AM, Derek Chesterfield
wrote:
On 6 Oct 2009, at 22:48, Alastair Houghton > wrote:
Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self
year]/g in Bill's code :-D :-D
Just an aside, but does either synt
On Wed, Oct 7, 2009 at 10:53 AM, Derek Chesterfield wrote:
>
>
> On 6 Oct 2009, at 22:48, Alastair Houghton
> wrote:
>
> Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self
>> year]/g in Bill's code :-D :-D
>>
>
> Just an aside, but does either syntax got optimised by the compil
On 6 Oct 2009, at 22:48, Alastair Houghton place.net> wrote:
Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self
year]/g in Bill's code :-D :-D
Just an aside, but does either syntax got optimised by the compiler
(GCC or LLVM). Obviously it can't in all cases, but this see
- (id) init {
if(self == [super init]){
Year = 0;
orignalYear = 0;
}
return (self);
}
In addition to the other comments regarding calling super, you don't
need to initialize instance variables to values like 0, 0.0, NO, nil,
On Tue, Oct 6, 2009 at 3:08 PM, Mick Walker wrote:
> One question: If I was to create an initializer such as the one you
> suggested. Would I still need the if(self =([super init]))... in the
> initializer?
You *always* need to call super's initializer, check its return value,
and assign it to se
On Oct 6, 2009, at 3:08 PM, Mick Walker wrote:
> One question: If I was to create an initializer such as the one you
> suggested. Would I still need the if(self =([super init]))... in the
> initializer?
Yes.
___
Cocoa-dev mailing list (Cocoa-dev@li
Hi Dave,
Thank you for you're reply.
One question: If I was to create an initializer such as the one you
suggested. Would I still need the if(self =([super init]))... in the
initializer?
Regards.
On 6 Oct 2009, at 22:43, Dave Carrigan wrote:
On Oct 6, 2009, at 2:26 PM, Mick Walker wrot
In addition to Bill's comments, which covered most things I think...
On 6 Oct 2009, at 22:26, Mick Walker wrote:
int g = Year % 19;
int c = Year / 100;
int h = h = (c - (int)(c / 4) - (int)((8 * c + 13) / 25) + 19 * g
+ 15) % 30;
int i = h - (int)(h / 28) * (1 - (int)(h / 28) * (i
On Oct 6, 2009, at 2:26 PM, Mick Walker wrote:
Hi everyone,
I am currently reading through Learn Objective-C on the Mac (M
Dalrymple & S Knaster). While working through the provided examples,
I want to back up what I am learning by attempting to put into
practice what is being demonstrat
On Oct 6, 2009, at 2:26 PM, Mick Walker wrote:
> #import
> @interface Easter : NSObject {
> int Year;
int year;
> }
> - (id) init;
>
> - (void) setYear: (int) year;
@property int year;
>
> - (void) CalculateYear;
- (void) calculateYear;
>
> @end
>
>
> --- Easter.m ---
> #import "Easter
Hi everyone,
I am currently reading through Learn Objective-C on the Mac (M
Dalrymple & S Knaster). While working through the provided examples, I
want to back up what I am learning by attempting to put into practice
what is being demonstrated to me.
To this end, I would like to post some
12 matches
Mail list logo