Hacker News new | ask | show | jobs
by ginko 4122 days ago
>If C++ will exist in 10 years from now, I predict 'virtual' to be just yet another legacy keyword.

I really doubt that. Not so much because of the virtual call overhead, but because there's plenty of cases where you really want control over how your class objects and structs look in memory. Adding a vtable entry to every struct is something you really don't want in many cases.

2 comments

Also from semantic point of view expressing which methods you are expecting to be overwritten in quite handy.
A lot of people forget about small and embedded devices.