On Tuesday, 4 June 2013 at 00:19:39 UTC, Manu wrote:


But this is a practical solution. The only counter-proposal I've heard is Andrei's 'all methods use ufcs' idea, but I think that one would be a much
harder sell to the community. I'm certainly not convinced.

It would be hard to sell for at least one reason - protected non-virtual methods are quite common:

module a;

class A
{
}

// should be accessible to derived classes
// and is not part of A's public interface
private void foo(A this_);

----
module b;
import a;

class B : A
{
    virtual void bar()
    {
        foo(); // How?
    }
}

Reply via email to