From: Alan Brain <aebrain@dynamite.com.au>
Subject: Re: C++ Family of Languages [was :ada and robots]
Date: 1997/06/25
Date: 1997-06-25T00:00:00+00:00 [thread overview]
Message-ID: <33B1E1E2.31DE@dynamite.com.au> (raw)
In-Reply-To: dewar.867078005@merv
Robert Dewar wrote:
>
> Brian said
>
> <<C++ is a very widely used *family-of-languages* which will be with us for
> a long time. Certainly if I had my druthers, there would be little new C++
> <<
>
> I don't understand the "family of languages" reference here.
Anyone who's tried porting large amounts of code in C++ will know what's
meant.
Case in point: I'm currently porting a large quantity of CodeWarrior C++
to VisualC++ 5.0. One example:
for (int i = 0 ; i < 10 ; i ++)
{
//some statements
}
for (int i = 0 ; i < 20 ; i ++)
{
//some more statements
}
On CodeWarrior, fine. But Visual C++ 5 barfs at the re-definition of the
(local) loop variable i. Yes, CodeWarrior (and I believe the draft ANSI
standard) has i being local within the loop, whereas VC++5 has strictly
only things within {} being local. OTOH for CodeWarrior 10(?) I need to
#include <bool.h>
Whereas VC++5 (and the ANSI draft) caters for type BOOLEAN, so barfs if
you include it. For strings, of course, I need to
#include <string>
for both, but also, for CWarrior I can then use
string ThisString;
whereas in VC++5 I need to
typedef std::basic_string<char> string
or similar before I can declare a variable of type string. This isn't
too bad: it's just an instantiation of a generic string for characters.
Too bad use of templates in C++ is often considered Highly Advanced.
These are not "old" compilers. They are at least industry standard, and
are probably ahead of the average. Every day, I miss Ada-83 more and
more and more... Except for Thursdays, when I teach Ada at ADFA.
I took the liberty of X-posting to comp.lang.c++ so you might get a few
more remarks on this thread.
--
aebrain@dynamite.com.au <> <> How doth the little Crocodile
| Alan & Carmel Brain| xxxxx Improve his shining tail?
| Canberra Australia | xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM
100026.2014 compuserve o OO*O^^^^O*OO o oo oo oo oo
By pulling MAERKLIN Wagons, in 1/220 Scale
See http://www.z-world.com/graphics/z/master/8856.gif for picture
next prev parent reply other threads:[~1997-06-25 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-19 0:00 ada and robots Jon S Anthony
1997-06-19 0:00 ` Brian Rogoff
1997-06-20 0:00 ` Jon S Anthony
1997-06-23 0:00 ` C++ usage (was Re: ada and robots) Brian Rogoff
1997-06-22 0:00 ` ada and robots John G. Volan
1997-06-25 0:00 ` Richard A. O'Keefe
1997-06-23 0:00 ` Robert Dewar
1997-06-24 0:00 ` Brian Rogoff
1997-06-25 0:00 ` Alan Brain [this message]
1997-06-26 0:00 ` C++ Family of Languages [was :ada and robots] Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox