Final by default?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Mon Mar 17 18:25:31 PDT 2014


On 3/14/2014 6:20 AM, Regan Heath wrote:
>
> Yes.. but doesn't help Manu or any other consumer concerned with speed
> if the library producer neglected to do this.  This is the real issue,
> right?  Not whether class *can* be made final (trivial), but whether
> they *actually will* *correctly* be marked final/virtual where they
> ought to be.
>
> Library producers range in experience and expertise and are "only human"
> so we want the option which makes it more likely they will produce good
> code.  In addition we want the option which means that if they get it
> wrong, less will break if/when they want to correct it.
>

While I personally would have been perfectly ok with changing to 
final-by-default (I'm fine either way), I can't help wondering: Is it 
really that big of a deal to sprinkle some "final"s into the occasional 
third party library if you really need to?



More information about the Digitalmars-d mailing list