Hacker News new | past | comments | ask | show | jobs | submit login

I agree that explicit annotation for overrides is desirable, but disagree that it alleviates the need for `override`. The fact that a method is introduced for the purpose of overriding is IMO important enough to justify an explicit annotation regardless, much like C# does it with `new` and `override`.

It's also not clear to me what this has to do with ODR, ADL etc. That is to say, it's obviously a problem with a historical design decision (implicit overrides) that now has to be kept for backwards compatibility reasons, making it impossible to require a `new` annotation above and beyond opt-in compiler warnings. But that particular problem is not a uniquely C++ one, seeing how implicit overrides are actually more common than explicit ones in mainstream OOP languages, largely because they have all inherited this choice from either Simula (as C++ did) or Smalltalk. C# is more of an exception in that regard.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: