Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: ObjC and the dual runtime issue(s)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC and the dual runtime issue(s)



Hi all,

I think, there may be a kind of "Common Base" Obj-C (something like ANSI C
in the C world), and "dialects".

Historically, Objective-C is now the MAIN driving power of the Macintosh
platform, and I agree that it must be as good and strong as it can be.
Preserving its strongest parts, of course. Consistency and strength are the
natural limiting barriers. Other barriers are artificial.

I am sure both streams of the evolution may bring great new things for all
us.

There are (will be) those distinct species of Objective-C:

- Common Objective-C (restricted variant)
- Apple Objective-C
- GNU Objective-C
- the others (probably, some future incarnations).

Oleg

PS I looked into my angry notes of 2001 (when I started with Objective-C).
There were dozens of suggestions, all quite stupid and short-sighted :)

However, I dare to share some of them with you.

1. A fast way to define NSNumber constants, like it has been done for
NSString?

Sample:
@YES ( [NSNumber numberWithBool:YES])
@123 ( [NSNumber numberWithInt:123])
@123L, @123.5, @123.5d, @0x09AF, @012, @'9' etc...

2. A fast way to define NSArray constants

@{@"what", @23, @127, @'a', @Null} //consists of NSString, NSNumber and
NSNull instances

@{5 = @12, @14, 11 = @21} //0-4 and 7-10 are filled with NSNull

3. Same for a dictionary

@{@"key1" = @11, @"key2" = @{}, @55 = @{@21=, @22=@33=@"Vacant"}}
@{} //an NSArray with 0 items
@21= //key [NSNumber numberWithInt:21] contains NSNull
@22=@23=@"Vacant" //both keys value is @"Vacant"
No way to create an empty dictionary...

4. These could be array{} and @dictionary{} or @[] for an array and @{} for
a dictionary.

In retain/release/autorelease games 1-4 would behave like an NSString
constant.

I must be wrong, but I don't see where it could contradict anything. These
changes would be delicate (?) and subtle.
_______________________________________________
objc-language mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/objc-language
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: ObjC and the dual runtime issue(s) (From: Greg Parker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.