▲ | kazinator 3 days ago | |
A signature pointer type knows nothing about the types it is legally pointing to; moreover, those types know nothing about the signature.
(Not sure if these member functions need to be virtual? I would have to dig up the Signatures docs.)This feature was removed because the implementation was becoming hard to maintain, or some reason like that. You can see it's pretty crazy from a C++ point of view, because c->recv(...) can be called through this pointer and it has to work for absolutely any object whose class conforms to the signature. And classes don't know they are conforming to any signature; nothing is declared in them for that. C++ polymorphism normally depends on declaration relationships through which implementation details like vtable positions can be inferred. | ||
▲ | saurik 3 days ago | parent [-] | |
But yet it is still true that you can implement this idea in normal C++ the way humanrebar described. (This is similar to std::function, which is a pointer to an object that happens to have an operator() that conforms to listed signature; but you can generalize that to any other set of things you want to be able to abstract into the pointer.) |