3 ms·
I agree. Most OO implementations are simply the foo instance data combined with a pointer to a table of foo function/method pointers that keep the foo function
by TimJYoung 16y ago
I agree. Most OO implementations are simply the foo instance data combined with a pointer to a table of foo function/method pointers that keep the foo functions in a nice tidy location, Throw in some scoping rules enforced by the compiler as to who/what can access the foo instance data, and that's really all there is to it. The type-safety is basically the same as with procedural code - you can't pass a reference/pointer to foo to a function/method that expects a bar reference/pointer.