Vision
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 24 03:02:37 PDT 2015
On 2015-10-23 14:44, Steven Schveighoffer wrote:
> Also, what type does 'id' map to?
I don't think that "id" is particular interesting. Apple is moving away
from it more and more. They added the "instancetype" feature for the
declarations of "init" and "alloc". They added generics for containers.
For a generic type to store any kind of object I would recommend using
"NSObject" which is (in practice) the root of all classes. NSProxy is
the only class I've seen which doesn't inherit from NSObject. Although
it still conforms to the NSObject protocol.
I would recommend against using "id" to store both objects and C types.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list