override and interface methods

FeepingCreature feepingcreature at gmail.com
Mon Oct 29 13:14:28 UTC 2018


When overriding a class method, you are required to specify 
`override`, indicating you are redefining existing behavior.

When implementing an interface method, override *can* be used but 
doesn't *have to* be used. This seems quite ambiguous and 
confusing. Am I overriding a method here? If yes, I should be 
required to use it. If not, I should not be *allowed* to use it.

Thoughts?


More information about the Digitalmars-d mailing list