From what I understand, instancetype declares to the compiler that the return type of the method is the same as the class receiving the message.
Traditionally I\'ve alwa
Constructor methods traditionally have returned id
, allowing subclasses to use them too.
id
, of course, means "any object at all". instancetype
was introduced to give a little more type strictness when assigning the result of a constructor method.
It's only useful in case of subclassing. If that method will never be overridden, it's better to be as explicit as possible and use the actual class name.