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."
Thread beginning with comment 477516
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: Basically, awesome
by FealDorf on Fri 17th Jun 2011 11:15 UTC in reply to "RE[5]: Basically, awesome"
FealDorf
Member since:
2008-01-07

What makes you think I'm talking about Java as being in any way superior?
Class System is done (almost) right in Eiffel. Method Renaming and Deleting.
The deficiencies? Diamond Inheritance and Constructor Chaining can make easy mistakes. The argument given is that "good practices and patterns will obviate this" but most of them exist only to overcome the shortcomings of the type system.

PS: And to clarify, the reason i say "class system" is because I don't wish to include templates into it, which are a lot more awesome

Edited 2011-06-17 11:16 UTC

Reply Parent Score: 1

RE[7]: Basically, awesome
by vodoomoth on Fri 17th Jun 2011 12:59 in reply to "RE[6]: Basically, awesome"
vodoomoth Member since:
2010-03-30

What makes you think I'm talking about Java as being in any way superior?

As I wrote earlier: "I don't know any other OO languages [...]"


Class System is done (almost) right in Eiffel. Method Renaming and Deleting.
The deficiencies? Diamond Inheritance and Constructor Chaining can make easy mistakes. The argument given is that "good practices and patterns will obviate this" but most of them exist only to overcome the shortcomings of the type system.

Once again, what are the said shortcomings? Wikipedia tells me Eiffel also has diamond inheritance and a quick Google search led me to a C# article saying constructor chaining is better than an initialization function. CC also exists in Java and I guess it is inherently tied to the inheritance concept, hence to any OO language. So the deficiencies you point out are also in the same language whose class system was "done (almost) right" to you? I am still puzzled as to what you're getting at.

Anyway, what's the language you prefer in terms of OO design?

Reply Parent Score: 2

RE[8]: Basically, awesome
by moondevil on Fri 17th Jun 2011 15:22 in reply to "RE[7]: Basically, awesome"
moondevil Member since:
2005-07-08

One thing that C++ lacks and opens the door for cool stuff is metaclasses.

Almost every OO language has metaclasses. Even Simula had it, but Bjarne thought it would be too heavy to have it in C++, so we are left with RTTI.

In the OS/2 days, IBM created SOM, which provided metaclasses for C++, but SOM died with OS/2.

http://en.wikipedia.org/wiki/IBM_System_Object_Model

I really enjoyed the productivity I could get out of Smalltalk, but it never caught on for several reasons, although Ruby has a bit of it.

Reply Parent Score: 2

RE[8]: Basically, awesome
by FealDorf on Fri 17th Jun 2011 23:47 in reply to "RE[7]: Basically, awesome"
FealDorf Member since:
2008-01-07

WELL....
[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

RE[8]: Basically, awesome
by FealDorf on Sat 18th Jun 2011 02:15 in reply to "RE[7]: Basically, awesome"
FealDorf Member since:
2008-01-07

Ehh, accidentally replied to my own comment. Anyway, here's my reply to your post..
http://www.osnews.com/permalink?477640

Reply Parent Score: 1