|
![](/i/fill.gif) |
In article <40394a33@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> What do you mean "no virtual functions"? If every function is dynamically
> bound, then *every* member function is virtual.
No. Virtual function tables are an implementation detail, the
implementation specifically used by C++. There are other ways of
implementing dynamic dispatch.
> > Again, I'm talking about single inheritance. Multiple inheritance is not
> > necessary, and is needlessly complex.
>
> Who is talking about multiple inheritance here? I'm not.
You're implying it. You say abstract classes can replace interfaces. A
class can have multiple interfaces, but in single interface models can
only inherit from one class. Therefore, I figured you must be talking
about multiple inheritance, because nothing else made sense.
> And multiple inheritance may be complex from the point of view of
> the interpreter/compiler, not from the point of view of the user.
> Why should that be a limit?
Look at virtual inheritance and why it's necessary.
> I don't understand what you are saying.
> Why have *two* types of classes when you can have just one?
I never said anything about two class types...I have no idea how you're
reading what I'm trying to say.
> And why abstract classes are not useful in single inheritance model?
Because you can only inherit from one.
> > Interfaces render multiple inheritance + multiple abstract root classes
> > obsolete, not the other way around.
>
> Interfaces are a poor way of making multiple inheritance. They have
> all the logical problems of multiple inheritance and they force you
> to make code repetition.
They do not have all the problems of multiple inheritance. And a
language could have default implementations for interfaces. Java is not
an example of a perfect, or even very good OO language.
> I have never understood what's so good about interfaces.
They avoid many of the problems of multiple inheritance.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |