OCUDL
OCUDL copied to clipboard
User defined literals for Objective-C
First off, awesome wizardry using the runtime and the new autoboxing to make this library. Really impressive! I converted the `$` macro to use `__VA_ARGS__` to allow as many arguments...
I wanted to suggest a tweak on the syntax, something like: ``` $(NSURLRequest)[@"http://apple.com"]; $(NSURL)[@"http://apple.com"]; $(UIColor)[0xff0000]; ``` This can be implemented with the following macro: ``` #define $(cls) (cls *)((id)[cls class])...
It would be interesting to do: ``` objc PhoneNumber* num = $(555-666-7777); ``` This would also allow the NSUUID literal to be simplified to not require "uuid" at the end.