|
|
|
|
|
by rramadass
1362 days ago
|
|
You are making inflammatory statements without understanding what has been written; it is not appreciated; I said; >to use the "virtual" prefix keyword for virtual functions across the entire class hierarchy. What is meant is that the entire signature of the virtual function including the "virtual" keyword is reproduced in all derived classes thus ensuring that no mistakes are made. I also said; >it gave the programmer the needed cue while the compiler doesn't care It was just good programming discipline rather than depending on compiler crutches. Just to drive it home; here is an example: https://stackoverflow.com/questions/4895294/c-virtual-keywor... |
|
No, that did not enforce safety or solved the refactoring problem I told you. It seems you do not want to listen that override fullfills the case where you assert that you are overriding (and it will be a compile error). You have a misunderstanding and a wrong mental model for how virtual worked. It did not enforce anything, just declared a virtual function, no matter it was new or an override. virtual can introduce a new virtual function by accident.
Example:
Refactor: > You are making inflammatory statements without understanding what has been written; it is not appreciatedNo, I was not. I was just showing you do not know how the mechanism works with facts.
Above you have an example of why what you say does not work. I would recommend to talk more concretely and not to make too broad statements about tools you seem to not know in detail but it is up to you, I would not stop you. Just a friendly recommendation ;)