This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ObjC additions (Was: Re: PROPOSAL: Objective-C++)
- From: Stefan Urbanek <stefanurbanek at yahoo dot fr>
- To: Kim Shrier <kim at tinker dot com>
- Cc: Ovidiu Predescu <ovidiu at cup dot hp dot com>, LHelldorf at kabel dot de, discuss-gnustep at gnu dot org, discuss-gnustep-admin at gnu dot org, gcc at gcc dot gnu dot org, Stan Shebs <shebs at apple dot com>, snaroff at apple dot com, Markus Grabert <xam at student dot cs dot ucc dot ie>, Ziemowit Laski <zlaski at apple dot com>
- Date: Mon, 19 Nov 2001 22:52:57 +0100
- Subject: ObjC additions (Was: Re: PROPOSAL: Objective-C++)
- References: <200111190559.fAJ5xDw20295@localhost.localdomain> <3BF960D4.640F023D@tinker.com>
Kim Shrier wrote:
>
> Ovidiu Predescu wrote:
> > I think
> > David's hate of NS*-ism is irrelevant here, as we are talking about
> > the language and the runtime system.
> >
>
> About a year ago, I was about 50% through adding support for protocols
> to the POC. David Stes raised such an objection to it that I stopped
> work. This is one of the NS*-ism's that David dislikes and it looks
> to me like it would have a direct influence on the language and the
> runtime system.
>
> > There are many neat things in POC that are quite
> > interesting, like blocks for example.
>
> I agree. I would like to see blocks in the GNU Objective C compiler.
>
Me too. And, what also about literal objects like arrays or numbers?
ConstantArray *array = @array(@"Item 1", @"Item 2");
or:
array = @(@"Item 1", @"Item 2");
And numbers:
ConstantNumber *value = @value(1);
or
ConstantNumber *intValue = @1;
ConstantNumber *doubleValue = @1.0;
And even dictionaries:
ConstantDictionary *dict = @{@"Key" = @"Value"};
Some default classes should be used like ConstantArray, ConstantNumber, and it
should be redefined by some gcc option, like now there is
-fconstant-string-class. Then, for example, ConstantNumber can be subclass of
NSValue. Imagine, then you would be able to write:
[dictionary setObject:@12.0 forValue:@"Size"];
Just an idea. I think, it can be userful.
What do you thing about it?
How is it difficult to have something like this?
Stefan