Most modifiers make sense to me – abstract, protected etc. But “virtual” seems a confusing arbitrary choice for what is really “overridable”.
‘Virtual’ in computing (virtual machine, virtual memory) seems to mean an abstract representation of something. I guess this originated from optics, where a virtual image (usually in*vert*ed) itself comes from Medieval Latin virtuālis, meaning “effective”.
So it seems to me it would make more sense if the ‘virtual’ method in computing was the overriding one, not the one-to-be-overriden.
Maybe I’m missing something fundamental about ‘virtual’, can anyone shed any more light on why it was chosen?
I tend to think of the term “virtual” as meaning not real. Such as, in terms of virtual memory, that maps through to real memory at some point but is really a placeholder until the mapping is needed.
Similarly, a virtual function is a placeholder which maps through to a real function at some point.
Even if you use the (somewhat childish) “pretend” definition, it makes sense:
In all those cases, the “virtual” is something that isn’t real. The use of them is translated into something real (emulating the machine, mapping the memory addresses through an MMU, calling a class-specific actual function rather than the virtual one, and so on).