RE: [GD-General] Re: Simulating constrained genericity in C++
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2001-12-27 17:40:44
|
I realize I may have inadvertently given the idea that Obj-C doesn't support static type checking very well (given my examples were that a client could query if an object supported a message and also what to do when a message wasn't understood). Just to be clear, Obj-C also has static type checking just like C++ if you statically type something. In addition, Obj-C has the notion of formal protocols which seem to be pretty much identical to Java interfaces. A class can conform to a formal protocol, and if it does conform than a client knows that all the protocol messages can be accepted. Brian |