2013-04-11

Reminder to self: use Objective-C literals, dummy.

I love how Objective-C is becoming more Perlish. See docs.

NSDictionary *fruits2colors = @{
                                @"apple"  : @"red",
                                @"banana" : @"yellow",
                                @"pear"   : @"green"
                                };

Although I am too scared to put a trailing comma after the last element, which is perfectly safe in Perl.

No comments:

Post a Comment