News for hackers. Stuff that matters.
Re:Cargo-cult typing, or: Objective-C's default type is id by mpweiher on Thursday March 06, 2014 @02:45AM (#7352423)
You could just write:

   id color = [UIColor green];
   id viewController = [[MyViewController alloc] initWithBackgroundColor:color];
The UIColor* is largely there for your benefit, for the compiler it makes hardly a difference (pre ARC). If you don't find it a benefit, just leave it out.
Re:Cargo-cult typing, or: Objective-C's default type is id by wsc981 on Thursday March 06, 2014 @08:39AM (#7353552)
Problem with using id is that it has no knowledge of type information. Xcode wont be able to autocomplete. This in contrast with using the var keyword in C#.
Re:Cargo-cult typing, or: Objective-C's default type is id by mpweiher on Friday March 07, 2014 @12:12PM (#7361381)
As I wrote: it's there for your benefit...