What’s new(ish) in ObjectiveC

What’s new(ish) in ObjectiveC

An overview of various syntax and compiler improvements that appeared in ObjC in the last few years, which make the code simpler and more DRY. Most of these were made possible by switching from GCC to Apple's own compiler infrastructure (LLVM). This includes:

* automatic generation of instance variables for @properties
* blocks (closures, lambdas)
* possibility to declare private instance variables in *.m file
* ARC (Automatic Reference Counting)
* automatic forward method declarations
* automatic @synthesize for @properties
* ObjC literals and array/dictionary subscripting

Two useful additions to Foundation.framework are also mentioned:

* NSJSONSerialization for JSON parsing
* NSRegularExpression for matching strings with regular expressions


Kuba Suder

April 04, 2013