"You can reuse code with inheritance. Absolutely crazy. Brilliant.
All of this blew me away."
Honestly?
"You can reuse code with inheritance. Absolutely crazy. Brilliant.
All of this blew me away."
Honestly?
TLDR: dynamic_cast is bad design
It's a bit of a shame, because I've found code to be reliably improved by using objects as simple tables of function pointers. The same is less often true for using objects as models of things.
If you keep an eye out for this, I'm pretty sure you'll start to spot it!
I agree with that a large extent - that's something that always amazes me about open-source. You're slogging along doing your thing, and then all of a sudden someone drops a huge patch on you that makes so much sense.
With that said; I did go back and re-read it, and your reading could be correct, it's hard to say. Does have a bit of humble brag to it for sure.
It is as if the OP did not grasp what OOP is all about.
For me it was epoll() that blew me away. Absolutely crazy. Brilliant. But in retrospect so damn obvious.