This is done so that the decision to create a virtual member function remains with the base class.
The decision to create a virtual function has design implications: if you create a virtual function, you must consider the possibility of its execution in a different way. On the contrary, you can expect that a non-virtual function will remain invariant.
Permission overrideto force virtuality "outside" may violate the assumptions of the author of the function. In addition, this will complicate a separate compilation, because the C ++ compiler must do additional things for virtual functions that are not performed for non-virtual ones, for example, finding an effective address from vtable or another mechanism used to implement virtual sending.
, Java , . ++ , . Java , Object, ++ , .