Walter Bright <> changed:

           What    |Removed                     |Added
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID

--- Comment #22 from Walter Bright <> 2012-05-03 
17:49:32 PDT ---
Please stop reopening this.

> If you mean whether a given call is legal, then you could by the same argument
insist that called method names must be resolved in the context of the virtual

And they are. It's what the vtbl[] is for.

> (b) is going to continue to be exempt from this requirement.

You cannot widen the requirements of a function without providing an override
of it. cannot be called with the widened requirements of - gets called. That's why it can be overridden. IT WORKS CORRECTLY. The
virtualness of the contracts is directly connected to the virtualness of the
function calls.

As for the design decision on this, the decision was (and is) to implement
classic OOP. It is theoretically sound. This is well trod and (I thought) well
understood territory. As Andrei pointed out, it is not open for debate what OOP

I realize I am not very good at explaining this. I seriously recommend reading
Meyer's book Object Oriented Programming. It's only $5.99.

If we try and implement alternate and incorrection notions of OOP, D will be
considered a lightweight language run by amateurs.

It is entirely possible that:

1. I have seriously misunderstood OOP (I have made more than my share of such
mistakes before).

2. The OOP community has got it all wrong.

As evidence for (1), is there any OOP language that does it these other ways?
Spec# does not, as Andrei researched and pointed out. For (2), you've got a
high bar to overcome, and certainly have an opportunity for a groundbreaking
academic paper.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to