<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 March 2014 20:40, monarch_dodra <span dir="ltr"><<a href="mailto:monarchdodra@gmail.com" target="_blank">monarchdodra@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wednesday, 12 March 2014 at 03:05:00 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm really trying to keep my lid on here...<br>
<br>
I'll just remind that in regard to this particular point which sounds<br>
reasonable, it's easy to forgot that *all library code where the author<br>
didn't care* is now unusable by anybody who does. The converse would not be<br>
true if the situation was reversed.<br>
<br>
virtual-by-default is incompatible with optimisation, and it's reliable to<br>
assume that anybody who doesn't explicitly care about this will stick with<br>
the default, which means many potentially useful libraries may be<br>
eliminated for use by many customers.<br>
Also, as discussed at length, revoking virtual from a function is a<br>
breaking change, adding virtual is not. Which means that, instead of making<br>
a controlled breaking change with a clear migration path here and now, we<br>
are committing every single instance of any user's intent to 'optimise'<br>
their libraries (by finalising unnecessarily virtuals) to breaking changes<br>
in their ABI - which *will* occur, since virtual is the default.<br>
According to semantic versioning, this requires bumping the major version<br>
number... that's horrible!<br>
<br>
What's better; implementing a controlled deprecation path now, or leaving<br>
it up to any project that ever uses the 'class' keyword to eventually<br>
confront breaking changes in their API when they encounter a performance<br>
oriented customer?<br>
</blockquote>
<br></div>
Case in point:<br>
<a href="https://github.com/D-Programming-Language/phobos/pull/1771" target="_blank">https://github.com/D-<u></u>Programming-Language/phobos/<u></u>pull/1771</a><br>
"mark std.zip classes as final"<br>
<br>
Long story short: MartinNowak decided to make the Zip classes final, since it made no sense to have any of the functions virtual, or to have anybody derive from them anyways.<br>
<br>
<a href="https://github.com/D-Programming-Language/phobos/pull/1771#issuecomment-36524041" target="_blank">https://github.com/D-<u></u>Programming-Language/phobos/<u></u>pull/1771#issuecomment-<u></u>36524041</a><br>
Comment from Dav1dde:<br>
"Just to let you know, it broke my code"<br>
</blockquote></div><br></div><div class="gmail_extra">Thank you.</div><div class="gmail_extra">There you go, it's not even hypothetical.</div></div>