Quoting <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel:
:Le ven 06/06/2003 � 23:16, Raphael Manfredi a �crit :
:> (I can develop why I think C++ is not an OO language if you want.)
:Yes I would like. I always heard favors on C++ (implicit memory
:management, 'inline' checkings, inheritance, reusability of tested
:classes, ...) but I'm interrested in knowing drawbacks.

Well, C++ has no garbage collector.  That is mandatory in any OO language
I think .

Then C++ is not a real OO language because it lacks the following:

* Genericity (constrained).  Don't tell me about templates, they're a joke
  that can only fool people who have never experienced genericity.
* Multiple inheritence.  C++'s notion of MI is just a joke that made a
  bad reputation to MI in general.  For a clean MI that works, look at Eiffel.
* C++ is contravarient but should be covarient.  All decent OO languages
  should be covarient.  What is covariance?  It means the type redefinition
  follows the hierarchy.  Contravarient means its goes backwards with the
  hierarchy.
* C++ lacks design by contract in the language.  This means inheritable
  precondition / postconditions, class invarients.
* C++ lacks selective exporting.  Its notion of "friend" is a joke.
* C++'s handling of attributes in a class is not correct.  There is no
  transparent access to an attribute as if it were an argumentless method.
* C++ requires that routines be declared "virtual" to be polymorphic.
* C++ lacks "deferred" classes ("abstract" in java) in the sense that it
  won't let anyone implement an interface with pre-/post-conditions but
  without an implementation body.

Note that most of the above applies to Java as well.

:For me a good design (more readable in C++), a clean memory management
:and the wide reuse of tested classes contribute to produce an efficient
:software. I'm agree that you can do in C as efficient as in C++ but it
:will need more care and work.

I'm not sure OO leads to self documenting.  You should see the kind
of code I routinely review at work to see what I mean.  It tends to
become a jury rig very rapidly.  More so than in C, because people have
a false sense of "security" in the modularity of OO languages.

Don't get me wrong, I like OO, but I've practiced it for a enough time to
know that it is not a silver bullet either.

Raphael


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to