News for hackers. Stuff that matters.
Re:A better introduction to Objective-C by bmelton on Tuesday September 27, 2011 @07:58AM (#3042862)
Don't confuse awkward with clever. The code that illustrates the IF conditional is far more readable than the self-returning YES or NO, where you don't even know that YES and NO are the return values.

Arguably, an ObjC programmer should know that booleans are YES and NO and not true or false, but so what? Code that can't be maintained isn't good code. Code that is developed within a team should be readable before it should be clever. if it is clever, or if it needs to be clever, then it should be commented to the degree that it is more easily understood.

I personally would rather write readable code than more comments.

Re:A better introduction to Objective-C by nolanw on Tuesday September 27, 2011 @11:54AM (#3043818)
> Arguably, an ObjC programmer should know that booleans are YES and NO and not true or false

It's just C. 0 is false, anything else is true.

Re:A better introduction to Objective-C by spicyj on Tuesday September 27, 2011 @11:34AM (#3043683)
Actually, YES == TRUE == 1 and NO == FALSE == 0.