<p dir="ltr"><br>
On 12 Mar 2014 22:50, "Walter Bright" <<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</a>> wrote:<br>
><br>
> The argument for final by default, as eloquently expressed by Manu, is a good one. Even Andrei agrees with it (!).<br>
><br>
> The trouble, however, was illuminated most recently by the std.json regression that broke existing code. The breakage wasn't even intentional; it was a mistake. The user fix was also simple, just a tweak here and there to user code, and the compiler pointed out where each change needed to be made.<br>

><br>
> But we nearly lost a major client over it.<br>
></p>
<p dir="ltr">std.json isn't precisely on the list of modules that showcase Phobos in a good light.  We'd be better off giving the module some TLC and update the API so it's consistent with the rest of Phobos in regards to coding standards and unittest coverage.<br>
</p>
<p dir="ltr">> We're past the point where we can break everyone's code. It's going to cost us far, far more than we'll gain. (And you all know that if we could do massive do-overs, I'd get rid of put's auto-decode.)<br>

><br>
> Instead, one can write:<br>
><br>
>    class C { final: ... }<br>
><br>
> as a pattern, and everything in the class will be final. That leaves the "but what if I want a single virtual function?" There needs to be a way to locally turn off 'final'. Adding 'virtual' is one way to do that, but:<br>

><br>
> 1. there are other attributes we might wish to turn off, like 'pure' and 'nothrow'.<br>
><br>
> 2. it seems excessive to dedicate a keyword just for that.<br>
><br>
> So, there's the solution that has been proposed before:<br>
><br>
>    !final<br>
>    !pure<br>
>    !nothrow<br>
>    etc.</p>
<p dir="ltr">Yuck. <br>
</p>