Broken?

bearophile bearophileHUGS at lycos.com
Tue Mar 11 15:02:34 PDT 2014


Brad Anderson:

> Have a link to where that was decided? I was under the 
> impression that virtual was  accepted as a compromise so people 
> could just stick "final:" at the top of their classes have have 
> something acceptably close to final-by-default.

I have seen D code in the wild where all member functions are 
virtual, impure and most variables are mutable. Programmers often 
stick to defaults, even when they are not the best choice. 
Virtual functions are functions with some extra functionality. 
When the programmer needs it, he/she/shi asks for it. When it's 
not needed, the programmer often sticks with what defaults the 
language designers have chosen.

Bye,
bearophile


More information about the Digitalmars-d mailing list