discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++)


From: Balazs Pataki
Subject: Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++)
Date: Tue, 20 Nov 2001 08:50:39 +0100

> 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"};

About 5 years ago, as part of my diploma work, I implemented exactly these  
features into NeXT's version of gcc 2.5.8, which came with NEXTSTEP 3.3, using  
NSNumbers, NSStrings NSDictionaries as the result of the @"", @() and @{}  
operators, ala WebScript. I called it "objectification" (using the @ operator), 
 
and also added operator overloading, for which I know I will get to the C++  
hell, but anyway, it was fun. :-) I probably have the sources somewhere and I  
can make it available if you like.
---
balazs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]