4 ms·
If you look at the history of object orientation, it starts as slots for function pointers in structs in C, with some preprocessor statements to make it easier
by jaggederest 11y ago
If you look at the history of object orientation, it starts as slots for function pointers in structs in C, with some preprocessor statements to make it easier to use. Literally the object is just a struct which holds data and function pointers.
Pretty interesting when you think about it - java hasn't moved that conceptually far from C preprocessor statements.
- reycharles 11y agoC++ isn't the start of object orientation.
- sklogic 11y ago> it starts as slots for function pointers in structs in C It was built around lambdas in Smalltalk long before that. Simula (about 4 years older) had a more typical class-based OO with vtables and a proper subtyping already. Long before any C.