On Wednesday, 4 December 2013 at 07:00:58 UTC, Manu wrote:
You mean you'd like virtual-by-default as you say (as is now), or you'd
like final-by-default at the cost of the transition?

Sorry, I meant to say I'd like final by default, but I can understand people being hesitant with the breakage required.

There is a proposed transition process across a few releases which should make the transition relatively painless, at least, it wouldn't be error prone, since warnings/deprecation messages would assist the process. 1. 'virtual' keyword is introduced, 'override'-ing unattributed methods is
a warning.
2. it becomes deprecated, but you can still compile with -d.
3. it becomes an error, but surely you've already taken the opportunity to
update your software, right?

This transition also works well. It does mean that the performance benefits would not occur until step 3, but while giving time to transition it also immediately provides the safety benefits. Ideally it would even catch bugs in peoples code as they make the required changes to add virtual where needed. The only issue is that it pretty much guarantees that most libraries that make use of classes and are no longer maintained will fail to compile, but honestly, I don't know think many projects will compile anyways when using a compiler / Phobos version that's more than a year newer than when the library was last modified.

Reply via email to