Slow performance compared to C++, ideas?

Walter Bright newshound2 at digitalmars.com
Wed Jun 5 17:49:17 PDT 2013


On 6/5/2013 4:29 PM, Steven Schveighoffer wrote:
> On Wed, 05 Jun 2013 18:56:28 -0400, Walter Bright <newshound2 at digitalmars.com>
> wrote:
>
>> On 6/5/2013 3:37 PM, Steven Schveighoffer wrote:
>>> No, I think it introduces a new foo.  Calling A.foo does not call B.foo.  In
>>> other words, it hides the original implementation, there are two vtable entries
>>> for foo.
>>>
>>> At least, that is how I understood the C# description from that post, and it
>>> seems Walter is trying to specify that.  The idea is that B probably defined foo
>>> before A did, and A adding foo should not break B, B didn't even know about A's
>>> foo.
>>
>> That's right.
>>
>
> Prompted by Paulo's reference, I see there is another twist not clear from the
> interview article.
>
> I think it is important to examine the *exact* semantics of C# so we can judge
> which parts to have.

I think we accomplish this in a simpler way:

1. 'virtual' means a method is an "introducing" one.
2. 'override' means a method overrides a base virtual function with a final 
function.
3. 'override virtual' means override with a non-final function.
4. none means final and non-overriding.



More information about the Digitalmars-d mailing list