Linked by Hadrien Grasland on Wed 15th Jun 2011 07:32 UTC, submitted by ebasconp
General Development "The recently finished C++ ISO standard, with the working name of C++0x, is due to be published this summer, following the finishing touches to the ISO spec language and standards wonks agreed upon in March."
Permalink for comment 477640
To read all comments associated with this story, please click here.
RE[8]: Basically, awesome
by FealDorf on Fri 17th Jun 2011 23:47 UTC in reply to "RE[7]: Basically, awesome"
Member since:

[disclaimer: I'm more of a language enthusiast, so I may make some obvious mistakes due to insufficient understanding]

The reason I said "almost right" is because I haven't found a single language that covers all the deficiencies (I conjured up) yet.

IIRC there are two problems of diamond inheritance -- method collision and multiple constructor invocation.

Method Collision is when a single method of a class has atleast two inherited implementations from its parent classes [they needn't have the same superclass]. Eiffel lets you explicitly control how each method is implemented.

However Eiffel faces the same issue that the same constructor can get called multiple times and may cause problems as in C++. The solution to this (accd to Java) is to use interfaces, however it doesn't address method collision and may require a lot of boilerplate code.

And yes, it's inherently tied to the concept of construction, so multiple parents can cause a mess.

(about the language in terms of OO) If you mean practically usable language, it'd be Ruby I guess which is so delightful to code in. In statically typed, I prefer C++ over others although D is starting to prettier every day.
If you mean theoretically, maybe CZ; a paper I found long ago titled "Multimethods with Multiple Inheritance without Diamonds" which addresses both the issues.

Reply Parent Score: 1