3 ms·
Even the Linux kernel, written entirely in C, is filled with object-oriented concepts including vtables because both encapsulation and polymorphism are useful c
by wvenable 6y ago
Even the Linux kernel, written entirely in C, is filled with object-oriented concepts including vtables because both encapsulation and polymorphism are useful concepts. Some as simple as multiple file systems all implementing a common interface (either local or over a network).
- dehrmann 6y agoData structures fit OO extremely well because of OO's ability to encapsulate state and how it can use inheritance to make different implementations of data structures interchangeable (hash-based maps vs sorted, tree-based maps).