D - more or less power than C++?

Derek Parnell derek at psych.ward
Sat Mar 4 04:54:16 PST 2006


On Sat, 04 Mar 2006 15:02:35 +1100, Walter Bright  
<newshound at digitalmars.com> wrote:

> The private/protected stuff works like it does in C++.

I'm not a C++ person so excuse my ignorance please, but are you saying  
that fully qualified references in C++ will override private/protected  
attributes? It does this in D.

//--- foo.d --
private void Foo() { }

// --------------

//--- test.d --
import foo;
void main()
{
    foo.Foo(); // Compiles!
    Foo();  // Doesn't compile.
}

-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d mailing list