Hi David,Thanks for the reply, I've managed to find a solution for my needs in the end.
It turns out the Apple gcc compiler supports mixing C++ and Objective-Cin the same source file so I've been able to implement what I was looking for using operator overloading - a much more flexible solution that doesn't
require the compiler to have knowledge of Apple's XCode core libraries.
I've attached the source, its a rather odd hybrid to say the least: The documentation is here: http://johnholdsworth.com/objcpp/htmlI need to write the unit tests now.. I'm not sure its saved me any time in reality but it was an interesting digression and hopefully it will be useful to somebody :)
objcpp.h
Description: Binary data
Cheers, John Holdsworth On 8 Apr 2009, at 14:34, David Ayers wrote:
Am Samstag, den 21.03.2009, 11:59 +0100 schrieb John Holdsworth:I was wondering if it would be a useful extension to Objective-C expand the [] operator to support array and hash references to NSArray and NSDictionary classes directly to greatly improve the readability of code:I'm not an ObjC front end maintainer and have no authority but one issueI would have with this feature with gcc proper is that the ObjC front end would have to learn about the semantics of "NSArray" and "NSDictionary" which are actually not part of the language but part of an external library. Now gcc already supports the -fconstant-string-class option as one wayto embed knowledge about an external library into an executable. But Iwould like adding options with all these semantics from a foreign library into the language implementation.Maybe this could be done more elegantly with plugin infrastructure thatthat es being currently added: http://gcc.gnu.org/wiki/plugins Cheers, David