|
|
|
|
|
by alex_smart
904 days ago
|
|
The biggest advantage of C-style polymorphism vs, say, C++ is that it actually offers much better encapsulation. Having private methods declared in the header file which is supposed to be the public contract for the class is such an anti-pattern. And the usual solutions offered for this problem are ugly in their own right (*pImpl). I only properly learnt to appreciate the power and beauty of OOP by reading people’s C code. |
|
Plus that same C pattern compiles in C++ without problems.