Hacker News new | ask | show | jobs
by chrisdevereux 5229 days ago
@-prefixed literals for collections are definitely welcome (I won't miss those nested 'dictionaryWith...' calls for sure).

Anyone know how the []-access will work? Is this going to be a special case for NSArray/NSDictionary synthesized in by the compiler, or is there going to be runtime support for a []-operator message a la Ruby, or maybe something related to key-value coding?

I hope this is done coherently, anyway. I worry that too many special cases to overcome problems like verbose collection access could snowball.

1 comments

There are methods you can implement in your own classes to provide setting and getting for both the array and dictionary style syntax.

If you're a Mac developer, check the forums. Else, wait for the info to be non-NDA.