POV-Ray : Newsgroups : povray.off-topic : And today, C# : Re: And today, C# Server Time
11 Oct 2024 07:13:35 EDT (-0400)
  Re: And today, C#  
From: Warp
Date: 13 Feb 2008 05:18:03
Message: <47b2c3db@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >  Why not disallow diamond inheritance? 

> Technically, you can't, since there's a common base type for all objects 
> in those languages.

  No, there isn't: The so-called "interfaces" are not inherited from the
common base class. What would stop these interfaces from having member
variables and function implementations?

  Besides, does this common base class have member variables? If not,
there is no problem with diamond inheritance.

  And even if it had, since it's an automatic inheritance forced
by the compiler, it's perfectly possible for it to automatically do
the same thing as C++'s "virtual inheritance" does. That is, even if
you multiple-inherit, there's still only one base class part in the
resulting objects and everything referring to this base class uses
this unique instantiation.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.