Programming, Swift, Object Oriented, Objective C.
&kDisplayCanvasVTable; // ... return (CanvasRef)canvas; }; void CanvasDraw(CanvasRef canvas) { canvas->vtable->draw(canvas); } Alternatively, we can add separate vtable in every structure to be able to execute overridden function. Swift and Objective-C implement dynamic method resolution by