Widespread C++ Competency Gap? 
Author Message
 Widespread C++ Competency Gap?

This message is a response to a lot of outrageous inaccuracies, innuendo,
rudeness, and flat-out false statements about C++ and its user community.
The most dignified response would be a solid technical paper documenting
the beauty and power of C++. However, people who believe even part of
the rubbish posted about C++ will be unlikely to invest the time to get
hold of such a paper and read it. In fact, the stated purpose of some
of the worst postings has been to warn people against gaining an under-
standing of C++. Also, there is no shortage of material describing C++
and its uses. Consequently, I chose to respond directly.

I consider a large portion of the bashing of C++ and the C++ users
unwarranted, ill-informed, self-serving, and intellectually dishonest.
Sadly, one must expected some mud to be thrown at anything successful,
but I think some posters have gone too far in their attacks on C++.

Please note, that I am NOT claiming C++ is perfect, that I am NOT
saying that every critic of C++ is dishonest or ill-informed, that
I'm not suggesting people should stop discussing C++'s strengths and
weaknesses (where relevant), and that I am NOT telling you to stop
using your favorite programming language and use C++ instead.

I am asking people to clean up their act, to be honest and up-front
with their aims and motives, to refrain from unsupported derogatory
statements, to avoid ``have you stopped beating your wife'' style of
demagogy, and to get a minimum of acquaintance with C++ before
starting to give advice (positive or negative) about it.

If you - like most people - have not been engaging in disreputable
debating practices, please don't take offense from my words; they
are not aimed at you.

And do, please do, learn not only C++, but also other languages,
systems, and techniques that might be helpful to your work and
intellectual growth. A closed mind is a recipe for bigotry.

Personally, I have found many stimulating ideas in Ada, Algol68,
CLOS, Eiffel, ML, Modula-*, Smalltalk, Simula, etc. and in code
written in those languages. For most of the kind of work I do,
I prefer C++, but I have never found learning a new language
unrewarding. The thing to remember, though, is that a programming
language - any programming language - is a means to an end (the
building of systems), rather than an end in itself. Considering
how to build better systems and how various languages can serve
that end is a much better use of time than fighting language wars.

Please remember that a system can be ``better'' according to many
different criteria. The particular purpose of a system together
with the particular context of its development often have decisive
effects on the judgement of a system by its builders and - more
importantly - of its users.

Below, I present abbreviated versions of common unfair attacks on C++
in quotes and then comment on them. Naturally, I try to make my comments
helpful to people suffering from the root causes of those of the attacks
that have a basis in reality rather than being just manifestations of
commercial or intellectual rivalry.

``C++ sucks''

        If you think so, go use what you consider better. It may indeed
        be better than C++ for your purposes.

        C++ is a very useful language that is used successfully by MANY
        people in MANY application areas. I guess that is a large part of
        what bothers some. By being successful, C++ offends many who
        have strong notions of what else ought to be successful.

        The major cause of complaints is C++ undoubted success. As someone
        remarked:

                There are only two kinds of programming languages:
                those people always {*filter*} about and those nobody uses.

        C++ isn't perfect. That is well known and acknowledged from the
        start. It is, however, a reasonably carefully thought-out language
        where the design is based part on acknowledged principles and part
        on solid experience and feedback from actual use. See my book
        ``The Design and Evolution of C++'' for an exposition of the aims
        of C++, the design process that led to the current language, the
        reasons for particular design decisions, etc.

        I wish I had an electronic equivalent to a little duck-horn,
        so that a rude BEEP was triggered by every unsupported derogative
        statement about C++. The noise would be deafening, though.
        An increasing number of people seem to relish displaying their
        ignorance and poor manners by snide remarks and gratuitous
        inaccuracies.

        At a recent conference, a speaker asked for a show of hands and
        found that twice as many people claimed to hate C++ as had ever
        written even a single small C++ program. The only word for such
        behavior is bigotry. In dealing with the current wave of C++ bashing,
        we should remember that bigotry is bred by ignorance and fear.

        It should also be remembered that if bigotry is not opposed but
        allowed to fester and sow distrust real harm results.

``C++ is too complex''

        C++ is much more complicated than, say, C and Pascal. However,
        MANY have succeeded in learning and applying C++. It has been
        demonstrated again and again that you don't need to be a genius
        to learn C++ in a reasonable time or to use C++ well. Further,  
        it has been demonstrated that there are several distinct ways
        of reaching that level of competence.

        So, what about C++ is hard to learn, and why? Someone knowing C
        well can learn Pascal in a week - and vice versa. Becoming expert
        - that is, learning to avoid the more common pitfalls and using
        common idioms of the new language - is harder. It could even take
        a couple of months. The reason for the easy transition is that
        the languages are fundamentally similar. All that needs to be
        learned is a bit of syntax and a few simple ways of using the
        new syntax. Often, this can be learned from looking at the briefest
        description of the language and some code. The time and effort
        needed is a small fraction of was originally invested in becoming
        an effective programmer.

        This is where C++ is different. The key concepts of data abstraction
        and object-oriented programming are new to most people. Yes, these
        days most people have heard about OOP, but most have no practical
        experience with it and can no more do a object-oriented design than
        swim or bicycle based only on having read an article on the subject.

        You can use C++ effectively as a more strongly type checked C with
        a bit of simple data abstraction and library use thrown in after
        a week. However, becoming comfortable with OOP/OOD takes most people
        much longer. Estimates of six to eigh{*filter*} month for becoming really
        proficient are often quoted, are in line with my personal experience
        with new C++ projects, and are in line with experience with other
        languages supporting OO.

        That demonstrates that the problems with notation and other language-
        technical details are minor. They are typically overcome within weeks.
        The real problems - as with any language - are conceptual: How to make
        a good design; not (just) how to express it.

        The much touted problems with readability are again vastly overstated.

        You can write obscure code in any language, and significant programs
        in a language you have only superficial knowledge about are always
        unreadable - especially if prejudice prevent you from actually
        trying to overcome notational barriers. A major part of readability
        is simply familiarity and experience.

        The idea that a manager or a complete novice in a language can come
        even close to comprehending a significant program because some inherent
        virtue of a particular language is nothing more than marketing hype
        and self-delusion. When people make such claims I wonder what else
        they might believe or be willing to claim.

        So why do reasonably clever and experienced people sometimes fail
        to learn C++ or fail to use it effectively after they have supposedly
        learned it? Usually because they have the wrong expectations. This
        actually has to be the case because I haven't found any strong
        correlation between what we could call smarts and becoming good
        C++ programmers. Some really clever programmers fail, and some
        supposedly mediocre ones succeed spectacularly.

        The ones that fail are usually the ones who believe they know
        everything already. Coming to C++ with a ``C is THE language''
        or ``OO means Smalltalk'' attitude is a recipe for failure.
        You can write in an (almost) pure C or (almost) pure Smalltalk
        style in C++, but that usually is not a good use of C++. Doing
        that involves a constant battle with the fundamental concepts
        of C++ and with the C++ type system. Against the fundamental
        structure of a language - any language - you can win Pyrrhic
        victories only.

        Another mistake is made by people who firmly believe that THEY
        don't need tutorial material. ``Real programmers read only code
        and reference manuals.'' That attitude is a recipe for disaster
        with C++. Undoubtedly, someone can learn OOP from reading code
        - after all Alan Kay (partly) learned OO by deciphering an 80
        page Simula program thinking it was Algol. However, most people
        are not in the same league as Alan.

        Experience shows that trying to learn OOP or C++ from the ARM
        (``The Annotated C++ Reference Manual'') is usually a BIG mistake.
        It is a nice book, I can recommend t (:-), but not as a tutorial.
        After all, most people wouldn't try learning a natural language
        exclusively from a grammar plus a dictionary. Few would succeed.

        Naturally, I recommend my ``The C++ Programming Language (2nd
        edition)'' for learning C++, but there are many other good books
        out there, and my book is not the best tutorial for everyone.
        Take advice from others who have succeeded in becoming good C++
        programmers (rather than from self-proclaimed C++ haters or people
        without ractical C++ experience). It is a curious phenomenon to find
        self-proclaimed C++ haters trying to cash in on C++'s popularity
        by teaching C++, writing articles on C++, and even by writing
        C++ textbooks as their first C++
...

read more »



Tue, 27 May 1997 11:53:02 GMT  
 Widespread C++ Competency Gap?

: This message is a response to a lot of outrageous inaccuracies, innuendo,
: rudeness, and flat-out false statements about C++ and its user community.
: The most dignified response would be a solid technical paper documenting

(long text message deleted)

I agree.  However after reading a few of these message I just delete them
as noise.  I have been teaching C++ for about three years now and have
also encountered some hostility toward the language.  I find it comes
from people (I'm dealing with professionals here) who are scared when
they find that they can't quickly grasp the concepts necessary to design
and build classes.  Since they can't understand the concepts quickly,
they need to blame something other than themselves so the language is the
obvious target.  Upon working with these students I find they can't
really handle C either but they don't realize it because in C you can
avoid features such as structures and pointers and believe you are
programming in C.

I eventually attempt to demonstrate the value of C++ to these programmers
by giving them a typical software maintenance task.  I have a simple
banking problem written both in C and C++.  I ask them to add a few
features and they find they can upgrade the C++ version easily and the C
version is much more difficult.  I explain that class design is very
sophisticated and not for everyone.  However, once classes are designed
properly, the remainder of the programming chore is significantly easier.

On the other hand, many of my professional friends who did not like C and
would even choose Ada over C have embraced C++ and refuse to use anything
else.  

I, too, get comments confusing C++ and Microsoft Windows.  From the
programmers point of view the two may be one in the same.

Anyway, I'm not sure why people who do not like C++ take the time to read
these newsgroups and make such comments.  

Regards,

John C.



Tue, 27 May 1997 21:22:32 GMT  
 Widespread C++ Competency Gap?
I have had a new experience recently and would like a little advice.
It seems to fit under the heading of C++ Competency.

I had students entering my classes from other institutions who consider
themselves experts in C++ and such like.  I do not consider that I'm
an expert but I can hack up C++ code that implements a simple
set of objects/ADTS/classes/....

So I worry about things like this in their code:
        All data members are public
        The classes don't relate to reality as I recognize it.
        A data member of a class declared as an array of pointers
                to some objects, rather than an array of the objects.
                (I think it is recodable with no hastle to run faster and
                        and with 50% less RAM...)
My question: Should I attempt to correct these habits?
        And if yes.... How?

--

ftp://ftp.csci.csusb.edu/dick
<a href="http://www.csci.csusb.edu/dick/">WWW</a>
Disclaimer::=`CSUSB may or may not agree with this message`.
Copyright(1994)::=`Copy as long as you include this copyright and signature`.



Wed, 28 May 1997 07:55:13 GMT  
 Widespread C++ Competency Gap?
If you can't think of a least one area where a language is better
than your prefered language then you probably aren't competent
to comment on it.

Robb Nebbe



Tue, 27 May 1997 23:40:37 GMT  
 Widespread C++ Competency Gap?

: I have had a new experience recently and would like a little advice.
: It seems to fit under the heading of C++ Competency.

: I had students entering my classes from other institutions who consider
: themselves experts in C++ and such like.  I do not consider that I'm
: an expert but I can hack up C++ code that implements a simple
: set of objects/ADTS/classes/....

: So I worry about things like this in their code:
:       All data members are public
:       The classes don't relate to reality as I recognize it.
:###    data member of a class declared as an array of pointers
:###    to some objects, rather than an array of the objects.
:###    I think it is recodable with no hastle to run faster and
:###    and with 50% less RAM...)
: My question: Should I attempt to correct these habits?
:       And if yes.... How?

Yes, except for the last one marked by '###'. Array of objects which can
have descendants will create hardly recognizable problems when you put a
descendant into an array and retrieve it as a parent (due to copy semantics
of an assignment to an array element).
----------------------------------------------------------------------------
IMHO. Igor Chudov,      Resource Solutions Intl         office (918)588-2309
Systems Engineer,       for WilTel.                     home   (918)585-5862

                                          http://m-net.arbornet.org/~ichudov
                                     1819 South Jackson #32-P Tulsa OK 74107

                 f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.



Thu, 29 May 1997 01:40:52 GMT  
 Widespread C++ Competency Gap?
    Dr. Richard Botting writes:

Quote:
>I worry about things like this in their code:
>...
>    A data member of a class declared as an array of pointers
>            to some objects, rather than an array of the objects.
>            (I think it is recodable with no hastle to run faster and
>                    and with 50% less RAM...)
>My question: Should I attempt to correct these habits?

    There is at least one good reason to use an array of pointers to
objects instead of an array of objects.  Each element in an array of
objects can only be initialized with the default constructor for that class.
So if you want to have some of those objects initialized with something
other than the default constructor you have to use an array of pointers to
objects instead of an array of objects.

Dean Schulze



Thu, 29 May 1997 02:49:47 GMT  
 Widespread C++ Competency Gap?

: This message is a response to a lot of outrageous inaccuracies, innuendo,
: rudeness, and flat-out false statements about C++ and its user community.
: The most dignified response would be a solid technical paper documenting
: the beauty and power of C++. However, people who believe even part of
: the rubbish posted about C++ will be unlikely to invest the time to get
: hold of such a paper and read it. In fact, the stated purpose of some
: of the worst postings has been to warn people against gaining an under-
: standing of C++. Also, there is no shortage of material describing C++
: and its uses. Consequently, I chose to respond directly.

[ ... ]

Let me put my 0.02$.

I admit that from time to time, I *disregard* some technologies ( e.g.
language or OS ). I know that this is not open-minded and regressive,
but what can I say, I guess it's human. BTW, I don't think something
being human means it is excusable.

This said, it seems that when people don't like a technology, they try to
rationalize their feeling. Some succeed, providing good argument, and
many don't and resort to fallacies like the ones the C++ language is
faced with in your message.

Now, if there are so many people that *disregard* C++, and if most of
their arguments are simply dumb, this is not sufficient to make them
*friends* of the C++'er class. We may postulate ( sorry for this 20$
word ) that there must be some deeper reasons that one don't want to
admit.

Popularity, of course, is part of the problem as you mention it.
A language becoming popular means for practitioners of some other
language, that they will get less job, find less reusable components
and poorer tools, etc. This is relative of course, of what they had
expected of the future before. This is a very bad news for them.

Also, for people that want to stay up-front of new software
breakthrough, there is a big chance that the *real stuff* will be
pioneered in the more popular language. Another bad news.

But why then do these people simply don't change their mind and adopt
the new language ?

Well, it is occurring right now. But this is painful. It requires efforts.
So we are screeming.

The fact is that here many people think C++ ask too much for what they
will be rewarded with. The language is simply too complex to use for
their needs. They don't want to bother with very low-level implementation  
details, or very high level concepts for efficiency purpose which can
be pass-by in their favorite language. They are
amateur user and don't want to look all the time in their reference manual
to find the good syntax and semantic of a particular construct.

BTW, this is not a critique. It is just the statement that C++ is not
primarily targetted at occasional users. IMHO, C++ must go forward
and not change it's mind for that matter.

Moreover, as Bjarne said, it is not impossible to think of set of
libraries together with a framework and a good book to use a sort of
Easy C++. Not quite to remember, simpler semantic, etc.

I apology if I offended someone with those words.

********************************************************

BTW, I never had the chance to tell you ( Bjarne ) all my respect,
for your work, for your insight, and for the advancement in language
design you made. Thanks.

Frederic Guerin



Thu, 29 May 1997 06:33:57 GMT  
 Widespread C++ Competency Gap?

: This message is a response to a lot of outrageous inaccuracies, innuendo,
: rudeness, and flat-out false statements about C++ and its user community.
: The most dignified response would be a solid technical paper documenting
: the beauty and power of C++. However, people who believe even part of
: the rubbish posted about C++ will be unlikely to invest the time to get
: hold of such a paper and read it. In fact, the stated purpose of some
: of the worst postings has been to warn people against gaining an under-
: standing of C++. Also, there is no shortage of material describing C++
: and its uses. Consequently, I chose to respond directly.

[ ... ]

Let me put my 0.02$.

I admit that from time to time, I *disregard* some technologies ( e.g.
language or OS ). I know that this is not open-minded and regressive,
but what can I say, I guess it's human. BTW, I don't think something
being human means it is excusable.

This said, it seems that when people don't like a technology, they try to
rationalize their feeling. Some succeed, providing good argument, and
many don't and resort to fallacies like the ones the C++ language is
faced with in your message.

Now, if there are so many people that *disregard* C++, and if most of
their arguments are simply dumb, this is not sufficient to make them
*friends* of the C++'er class. We may postulate ( sorry for this 20$
word ) that there must be some deeper reasons that one don't want to
admit.

Popularity, of course, is part of the problem as you mention it.
A language becoming popular means for practitioners of some other
language, that they will get less job, find less reusable components
and poorer tools, etc. This is relative of course, of what they had
expected of the future before. This is a very bad news for them.

Also, for people that want to stay up-front of new software
breakthrough, there is a big chance that the *real stuff* will be
pioneered in the more popular language. Another bad news.

But why then do these people simply don't change their mind and adopt
the new language ?

Well, it is occurring right now. But this is painful. It requires efforts.
So we are screeming.

The fact is that here many people think C++ ask too much for what they
we will be rewarded with. The language is simply too complex to use for
their needs. They don't want to bother with very low-level implementation  
details, or very high level concepts for efficiency purpose which can
be pass-by in their favorite language. They are
amateur user and don't want to look all the time in their reference manual
to find the good syntax and semantic of a particular construct.

BTW, this is not a critique. It is just the statement that C++ is not
primarily targetted at occasional users. IMHO, C++ must go forward
and not change it's mind for that matter.

Moreover, as Bjarne said, it is not impossible to think of set of
libraries together with a framework and a good book to use a sort of
Easy C++. Not quite to remember, simpler semantic, etc.

I apology if I offended someone with those words.

********************************************************

BTW, I never had the chance to tell you ( Bjarne ) all my respect,
for your work, for your insight, and for the advancement in language
design you made. Thanks.

Frederic Guerin



Thu, 29 May 1997 06:36:49 GMT  
 Widespread C++ Competency Gap?

Quote:
>The most dignified response would be a solid technical paper documenting
>the beauty and power of C++. However, people who believe even part of
>the rubbish posted about C++ will be unlikely to invest the time to get
>hold of such a paper and read it.

Well, I believe most of the "rubbish" posted about C++, but I'd like to
hear the other side of the story.  I'd be surprised to find it convincing,
though, since some of the frequently cited C++ "advantages" are unconvincing,
at best (compatibility with C and ancient linkers come immediately to
mind).

Nonetheless, I _will_ read such a paper, in the hopes of finding some
"beauty" I somehow missed.

Quote:
>Personally, I have found many stimulating ideas in Ada, Algol68,
>CLOS, Eiffel, ML, Modula-*, Smalltalk, Simula, etc. and in code
>written in those languages.

We agree on this.

Quote:
>but I have never found learning a new language
>unrewarding.

I have (there are some _{*filter*}_ 4GLs out there -- don't think I learned
anything from RPG, either), but it's usually interesting, especially
as you head away from the mainstream toward active research.

Quote:
>Below, I present abbreviated versions of common unfair attacks on C++
>in quotes and then comment on them. Naturally, I try to make my comments
>helpful to people suffering from the root causes of those of the attacks
>that have a basis in reality rather than being just manifestations of
>commercial or intellectual rivalry.
>    The much touted problems with readability are again vastly overstated.

My biggest complaint on this topic:  automatic type conversion.  I _really_,
_really_ hate compilers doing obscure things behind my back.  The new
"explicit" keyword helps, but, of course, the default's wrong.

Why not make "explicit" the default, and require conforming compilers to
support a "default is implicit" switch?  That should prevent breaking
the existing codebase.

Quote:
>    Proponents of languages that still have relatively minute - and
>    therefore relatively close-knit and well-informed user communities
>    - are making the mistake I made: seeing the evident success and
>    enthusiasm of their fellow ``cult members'' as a direct consequence
>    of qualities of their favorite language. They are wrong; if - against
>    all odds - their language should escape into the mainstream the
>    vastly enlarged user community will get its share of the problems
>    and failures.

Valid point, but I think you're underplaying the problems stemming from
the interactions of novices and needlessly complicated languages.

-dms



Thu, 29 May 1997 10:19:14 GMT  
 Widespread C++ Competency Gap?

Quote:

>    Dr. Richard Botting writes:
>>I worry about things like this in their code:
>>...
>>        A data member of a class declared as an array of pointers
>>                to some objects, rather than an array of the objects.
>>                (I think it is recodable with no hastle to run faster and
>>                        and with 50% less RAM...)
>    There is at least one good reason to use an array of pointers to
>objects instead of an array of objects.  Each element in an array of
>objects can only be initialized with the default constructor for that class.
>So if you want to have some of those objects initialized with something
>other than the default constructor you have to use an array of pointers to
>objects instead of an array of objects.

I also use arrays of object pointers very often - For the reason mentioned
above, as well as avoiding hassles of linked lists/etc, when I have
objects that are not likely to be sorted, etc often.  If I know I will
be having a set range of objects, maybe between 5 & 50, an array
of pointers doesn't waste too much space - and the access is quick,
& I can access them directly through an index.

I mean, 50 pointers is (usually) 50 * 4 = 200 bytes.  Not bad.

--
The opinions expressed in this article are actually YOURS...
You just don't know it yet!



Thu, 29 May 1997 12:25:18 GMT  
 Widespread C++ Competency Gap?

Quote:


>Well, I believe most of the "rubbish" posted about C++, but I'd like to
>hear the other side of the story.  I'd be surprised to find it convincing,
>though, since some of the frequently cited C++ "advantages" are unconvincing,
>at best (compatibility with C and ancient linkers come immediately to
>mind).

        In that case you completely miss the point of C++.
Its _principle_ advantage is that it gains leverage off C.
That is why it is popular -- it preserves the large C code
base, programmer base, and it it permitted a portable
implementation to be written (CFront).

        The issue here is not whether C++ is the best
language which one could design, but to design one that
was worth the effort working on -- that is, one which
would have widespread use.

Quote:
>Valid point, but I think you're underplaying the problems stemming from
>the interactions of novices and needlessly complicated languages.

        And you are ignoring the commercial realities of the
world. Bjarne tried to design a language which provided an
upgrade path which would ensure it's popularity and which
would introduce programmers to modern concepts.

        And succeeded. Of course there is a compromise
in a language which supports both machine level programming
and OO!

--

        Maxtal Pty Ltd,            
        81A Glebe Point Rd, GLEBE   Mem: SA IT/9/22,SC22/WG21
        NSW 2037, AUSTRALIA         Phone: 61-2-566-2189



Thu, 29 May 1997 13:05:15 GMT  
 Widespread C++ Competency Gap?

Quote:

>Well, I believe most of the "rubbish" posted about C++, but I'd like to
>hear the other side of the story.  I'd be surprised to find it convincing,
>though, since some of the frequently cited C++ "advantages" are unconvincing,
>at best (compatibility with C and ancient linkers come immediately to
>mind).

We are developing a realtime system that must be portable across a number of
platforms conforming to the standard POSIX spec (the standard binding is in
C), the realtime POSIX spec/draft (the standard binding for which is in C),
accessing BSD sockets (the standard API defined in C), allow low level
access and run on systems that use standard UNIX linkers.

In this case there is no doubt that C compatibility is important; C++'s
high availability is also more than a little persuasive. For our purposes
Ada, Eiffel, Smalltalk and co are not even on the starting blocks.

+---------------------------+-------------------------------------------+
| Kevlin A P Henney         | Human vs Machine Intelligence:            |

| Westinghouse Systems Ltd  |                                           |
+---------------------------+-------------------------------------------+



Fri, 30 May 1997 18:11:27 GMT  
 Widespread C++ Competency Gap?

Quote:
>    And succeeded. Of course there is a compromise
>in a language which supports both machine level programming
>and OO!

  Right. Just call it properly "Object Oriented Assembly".

  After all, "C" success was mainly to to the fact that it was
  (and still is) mainly a "Portable Assembly".

--

Quote:
>>> Opinions presented above are solely of my own, not those of my employer <<<




Sat, 31 May 1997 00:15:43 GMT  
 Widespread C++ Competency Gap?

|>
|> We are developing a realtime system that must be portable across a number of
|> platforms conforming to the standard POSIX spec (the standard binding is in
|> C), the realtime POSIX spec/draft (the standard binding for which is in C),
|> accessing BSD sockets (the standard API defined in C), allow low level
|> access and run on systems that use standard UNIX linkers.
|>

The students in our software engineering course are doing a project that
is something like this. The have the Ada POSIX interface, all the realtime
facilities of Ada, an interface to BDS sockets that is much cleaner
than the C interface (written by two students after a semester of Ada)
and low-level access.

Now unless they are really ambitious they won't need the realtime
facilities or the low-level access to finish the project but they are
there to fall back on. The project will be distributed acrossed two
different types of machines and I wouldn't expect any difficulty migrating
to another architecture.

|> In this case there is no doubt that C compatibility is important; C++'s
|> high availability is also more than a little persuasive. For our purposes
|> Ada, Eiffel, Smalltalk and co are not even on the starting blocks.

I don't know about Eiffel and Smalltalk but Ada 83 works fairly well
for this kind of a project and the new revision of Ada works even
better.

Maybe I should change the thread to "Widespread Ada Competency Gap" :-)

Robb Nebbe



Sat, 31 May 1997 00:16:39 GMT  
 Widespread C++ Competency Gap?
]    Dr. Richard Botting writes:
]
]>I worry about things like this in their code:
]>...
]>   A data member of a class declared as an array of pointers
]>           to some objects, rather than an array of the objects.
]>           (I think it is recodable with no hastle to run faster and
]>                   and with 50% less RAM...)
]
]>My question: Should I attempt to correct these habits?
]
]    There is at least one good reason to use an array of pointers to
]objects instead of an array of objects.  Each element in an array of
]objects can only be initialized with the default constructor for that class.

Another reason to use an array of pointers is if you want to use the array
elements polymorphically.  You can assign a Derived* to a Base*, and then
call virtual functions to get the overriding versions of methods defined in
the Derived.  But if you have an array of objects rather than pointers, you
can't have Derived objects in the array.  This loses much of the power of
OO programming.
--

Barry Margolin
BBN Internet Services Corp.



Sat, 31 May 1997 03:46:10 GMT  
 
 [ 157 post ]  Go to page: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

 Relevant Pages 

1. Widespread C++ Competency Gap?

2. Bjarne's defence of C++ (Was: Re: Widespread C++ Competency Gap?)

3. Real-time GC (ws Re: Widespread C++ Competency Gap?)

4. What's Real-Time? (was Re: Widespread C++ Competency Gap?)

5. Object Oriented COBOL Use: How Widespread?

6. How widespread is Ada now?

7. How widespread is NIS support?

8. WIDESPREAD INCOMPETENCE AT BELL ATLANTIC

9. WIDESPREAD INCOMPETENCE AT BELL ATLANTIC

10. Widespread use of Tclets

11. Prime Gaps: a method for calculating them.

12. CLACOM by GAP Comm.

 

 
Powered by phpBB® Forum Software