4 ms·
Objective-C's incredibly verbose syntax for array and hash manipulation is my number one pain point with the language. A little syntactic sugar would go a long
by cageface 15y ago
Objective-C's incredibly verbose syntax for array and hash manipulation is my number one pain point with the language. A little syntactic sugar would go a long way here.
- jamesjyu 15y agoTry this set of macros that adds some syntactic sugar to obj c: https://github.com/petejkim/ConciseKit https://github.com/petejkim/ConciseKit For example, this: [NSDictionary dictionaryWithObjectsAndKeys:v1, k1, v2, k2, nil] Turns into: $dict(v1, k1, v2, k2)
- stephth 15y agoThis looks promising, thanks for the tip. I didn't know you could use $ in macros. Does the C preprocessor accept any other special characters?