Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Objective-C 2.0, and modern features
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objective-C 2.0, and modern features



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Howdy, I'm looking around trying to find a definite feature set for Objective-C 2.0 that will be shipped with 10.5, and I'm wondering if this will include something I quite enjoy from C# and Java, autoboxing. I can't even begin to say how often I've mistakenly used TRUE/FALSE when changing a value of Boolean type in an NSManagedObject, or an int value, instead of creating an NSNumber ([NSNumber numberWithInt]) and then at some point or another calling [NSNumber intValue] to take the primitive type (whether it be BOOL, or int) out of the NSManagedObject at some point.

While I'm certain I could define a BOX() and UNBOX() macro to handle this for me, it's a far more elegant solution IMHO to handle boxing on a language level. That said, I'm not sure if this is particularly feasible given how objects are managed in the ObjC runtime versus Java/C#.

Just curious, I'm a typical programmer, in that I'm lazy, but there's so many places (Core Data, Web Services, etc) that take "boolean" values or "integer" values, but they don't jive well with BOOL, or int values like the rest of the 'world'.



Cheers,

- -R. Tyler Ballance
Lead Developer, bleep. LLC
http://www.bleepsoft.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFE3pJ2qO6nEJfroRsRAuI3AKCKXmneBkSyGp0o17JxqiHCYwo/CACgi9su
OWBE4ooOuxW9YsLXKQYXk5g=
=0QoN
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to 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.