Swift may finally be replacing Apple's former favorite, Objective C, according to the latest Tiobe programming language popularity charts.
It won't be deprecated, but it'll move to Florida to enjoy its golden years. It'll spend days running the legacy app with a million lines of code, and its nights sipping margaritas with the OAuth library everyone fears rewriting.
While Objective-C is still supported by Apple and will likely not be deprecated anytime soon, there will be no updates to the language. Objective-C is as good as it's ever going to get.
The latest version of objective C is 2.0.
Apple's coding guidelines can be found here: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html
Great question, thanks for asking it.
A few of my personal coding standards:
[self setOptions:...]
on the next one. This makes debugging simpler anyways.[object property]
notation.m_
or at least _
. But I usually don't, because it's ugly to look at. And goodness knows we Apple people hate ugly things. :)(For what it's worth, in your example above, you can get an autoreleased string directly by using -[NSString stringWithFormat:...]
instead of the alloc/init/release.)
Not that I use and/or like it, but Google's Objective-C Style Guide is worth a mention and a read.
This is probably the dissenting opinion around here but… I don't indent single lines at all, I turn on word-wrap. The advantage of this is that you can shrink/stretch your windows and the code always looks good, plus you don't have to waste any time messing around with newlines and tabs/spaces trying to make your code look acceptable.
This is another good source: (I am new so it wouldn't let me post two links in the same answer) http://cocoadevcentral.com/articles/000082.php (Cocoa Style for Obj C part 1 of 2)
part 2 is the same link but ending in 000083.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With