Calum said:
I am in no doubt that Eiffel is cleaner safer language, however that's
not quite the same as power.
So what can you express in Eiffel that cannot be expressed in C++?
[Actually, resolving name-clashes in multiple inheritance is one,
contracts is another.] But are these fundamentally difficult in C++,
or just a little uglier?
Contracting is fundamentally difficult in C++, because adhering to the
inheritance rules of contracting is not easily accomplished. Doing so
requires a lot of preprocessor directives/macros, and makes the code
extremely ugly.
Resolving name clashes in C++ *can* be difficult if there are a lot of
them, and you need to make sweeping changes. Automated search and
replace can help, of course, but may not do everything you need.
Otherwise, it's just flat out ugly in C++.
Eiffel supports selective exporting, covariant argument redefinition,
constrained genericity, and has polymorphism by default without any
added performance penalty. C++ supports none of these. Eiffel also
fully supports the Open Closed Principle, while C++ does not (due to
requirement of virtual keyword and private access limitations). None
of these issues really affect the choice about whether one can develop
an OS with them or not.
Are parameterized types in Eiffel as flexible as those in C++?
Not really. Eiffel supports constrained genericity, but it does not
support expression templates like C++ does. Of course, expression
templates are really a side-effect in C++, as they were not part of
the original intention. They are great for performance and expressive
power, but they are damn ugly.
Steve