This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Syntactic sugar to access arrays and hashes in Objective-C


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 issue
I 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 way
to embed knowledge about an external library into an executable.  But I
would 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 that
that es being currently added: http://gcc.gnu.org/wiki/plugins 

Cheers,
David



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]