| ▲ | jstimpfle 20 hours ago | |||||||
1. No, you're not writing code you don't have to. It's not different to implementing this as non-virtual methods, in fact I'd argue doing simple functions is more straightforward. 2. And the code being compiled is abstract & generic, it won't be instantiated for every type and bloat the executable or instruction cache. 3. Security concerns: With C++ virtual methods every object carries a mutable pointer too (to a vtable containing function pointers). What resource management side effects please? | ||||||||
| ▲ | kllrnohj 15 hours ago | parent [-] | |||||||
Re #3: vtable pointers aren't mutable...? | ||||||||
| ||||||||