2 ms·
The syntax is all about C compatibility. Objective-C (unlike C++) is a strict superset of C. Anything using bracket notation in Objective-C is using dynamic O
by favorited 7y ago
The syntax is all about C compatibility. Objective-C (unlike C++) is a strict superset of C. Anything using bracket notation in Objective-C is using dynamic OO message-passing. Anything that reads like C syntax is plain-old C.
The closure syntax also relates to C compatibility. Because the Clang blocks extension isn't an extension to Objective-C, but to C. The syntax matches C's function pointer syntax, just replacing the * with ^. ^ was chosen because (A) it has no unary form in C, and (B) it can't be overloaded in C++.