***** D method override mechanisms borked ****** (some more borkiness)

Derek Parnell derek at psych.ward
Fri Jun 30 21:25:10 PDT 2006


On Sat, 01 Jul 2006 10:07:00 +1000, Bruno Medeiros  
<brunodomedeirosATgmail at SPAM.com> wrote:



>
> Second, I just noticed something in the spec that seems inconsistent or  
> in error (I'm surprised that no one else mentioned this):

I did and rewrote the docs for this.

   http://www.users.bigpond.com.au/ddparnell/attr.html

> On http://www.digitalmars.com/d/attribute.html , Protection Attribute,  
> it is said: "Private members cannot be overridden."
>
> Seems fine to me. But on http://www.digitalmars.com/d/function.html ,  
> Virtual Functions, it is said: "Functions marked as final may not be  
> overridden in a derived class, unless they are also private." !
> What this says not only seems a clear contradiction, but also broken  
> design!

This is an example of poor English rather than anything else. A better  
rendition might have gone along the lines of  ....

   Functions marked as final cannot be overridden in a derived class, and  
marking a
   private function as final is just ignored because a private function  
can't
   be seen by the overriding class anyway.


-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d-bugs mailing list