• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Future Objective-C changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future Objective-C changes


  • Subject: Re: Future Objective-C changes
  • From: Jeff <email@hidden>
  • Date: Fri, 16 May 2003 02:23:13 -0600

Dennis C.De Mars had what seems the most elegant addition to the *syntax* of Obj-C in the "ObjC Wish List" thread, here:

http://cocoa.mamasam.com/MACOSXDEV/2003/03/2/59873.php

I like that it's not a language change, but a helpful syntax tweek for NSArray, NSDictionary and NSNumber, a la NSString. This would be much more enjoyable to code than the current syntax (which I find myself writing over and over in different places -- this example code taken from the above post).

[thisRecord addInfo:
@{
@"Name" => @"John Doe",
@"Age" => @(34),
@"Hobbies" => @{@"Fishing", @"Bowling", @"Philately" },
@"Children" => @{
@{@"Name" => @"Manny", @"Age" => @(6)},
@{@"Name" => @"Moe", @"Age" => @(5)},
@{@"Name" => @"Jack", @"Age" => @(4)}
}
}];

Heck it might even encourage me to use NSNumber more often.
Perhaps Perl, etc, spoiled me. I love Obj-C, but tweeks like this would help.
Is there a way to pull this off with a compiler directive of my own (semi-easily)?

-Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Future Objective-C changes (From: Nicholas Riley <email@hidden>)

  • Prev by Date: Re: Future Objective-C changes
  • Next by Date: Re: Setting BOTH single and double actions from an outline view
  • Previous by thread: Re: Future Objective-C changes
  • Next by thread: Re: Future Objective-C changes
  • Index(es):
    • Date
    • Thread