Monday, December 10, 2012

instancetype

Mattt Thompson:

instancetype is a contextual keyword that can be used as a result type to signal that a method returns a related result type.

[…]

With instancetype, the compiler will correctly infer that the result of +personWithName: is an instance of a Person.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment