home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:18798 comp.object:4728
- Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.c++,comp.object
- Subject: Re: Pros and cons of C++
- Message-ID: <TMB.93Jan7174627@arolla.idiap.ch>
- Date: 8 Jan 93 01:46:27 GMT
- References: <C0Hp1n.vp@gpu.utcs.utoronto.ca>
- Reply-To: tmb@idiap.ch
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 57
- NNTP-Posting-Host: arolla.idiap.ch
- In-reply-to: yjohn@gpu.utcs.utoronto.ca's message of 7 Jan 93 15:15:22 GMT
-
- In article <C0Hp1n.vp@gpu.utcs.utoronto.ca> yjohn@gpu.utcs.utoronto.ca (John Ross) writes:
-
- I have recently come to grips with having to learn C++; mainly due to
- the bandwagon effect. It doesn't look like there will be any pure C
- programmers left in a couple of years. I agree that the language is
- very complex, and has many shortcomings. [...]
-
- Why then is it becoming so popular? Why the deluge of texts, articles,
- magazines, news groups, compilers, etc?
-
- I think the reasons are mostly pragmatic ones:
-
- * C++ interfaces easily with C/FORTRAN code (for example, using
- "Xlib" with C++ has been pretty trivial from the beginning; even a
- language like Modula-2 or Ada, both of which are really quite
- similar in character to C++, required "new bindings").
- * Existing C programs can easily be recompiled as C++ programs.
- * With a minimum of training, C programmers can fancy themselves
- C++ programmers.
- * The C subset of C++ runs about as fast (or as slowly) as C
- code. For PCs and workstations, that is acceptable (for
- supercomputers, it is not).
- * While C/C++'s support for bittwiddeling is "all wrong", being
- unportable and unsafe, at least it is there and works reasonably
- efficiently.
- * There are lots of compilers available (including GNU C++),
- and there is lots of support. (Why are there lots of compilers
- available? Because there are lots of users. Why are there lots
- of users? Because C++ started out as a relatively modest
- and simple extension of C.)
-
- For each of the alternative languages (Modula-2, Ada, Modula-3,
- Smalltalk, CLOS, Eiffel, SML, etc.), some of these very pragmatic
- requirements are not satisfied.
-
- Anyway, enough rambling--what are your thoughts? Do you use C++; will
- you; what do you like, dislike about it; what is it's future; etc, etc?
-
- What do I dislike about C++?
-
- * No type safety.
- * No pointer safety.
- * No arithmetic overflow detection.
- * No module system to speak of.
- * No garbage collection.
- * Inefficient memory management.
- * Hairy scoping rules.
- * Hairy, implementation dependent linking.
- * A number of important optimizations are impossible.
- * Insufficient language support for separating implementation
- dependent/unportable features from the rest of the language.
-
- When I don't need to interface with existing C/FORTRAN code or when my
- algorithms get complicated enough that these latter problems with C++
- matter, I use a different language.
-
- Thomas.
-