Mail Archives: djgpp/1998/09/10/00:15:59
bstroustrup AT my-dejanews DOT com wrote:
[<snip>]
>
> Actually, many (most) recently released compilers supports the "new stuff"
> such as namespaces and the STL (e.g. Borland, MS, G++, EGCS, EDG-based
> compilers). I describe Standard C++ rather than the most widely available
> subset, but I'm not that far ahead of what's shipping.
>
> - Bjarne
>
I'm wondering now what will happen to plain C now that a lot of stuff is
being added to C++ such as namespaces. Eventually, C will have to
"catch up" to C++ to some degree and implement namespaces as well,
especially if stdio.h is going to have namespaces. C has added a lot of
C++ features over the years, such as:
const int a=5; so I've been using this in regular C instead of
#define a 5
Also, I've noticed a lot of C compilers will allow // comments in
regular C mode. One thing I hate to see is in C++ code people are
afraid to use /* */ comments, but they put a big multi-line comment
with // at the beginning of each line.
I think we'll see a lot of C++ stuff migrating over to C such as try and
catch. Then the problem will be how to differentiate C from C++. Like,
is the goal of C to be a sort of "C++-lite" without classes? For
example: if you do a lot of low-level hardware stuff and/or need a low
memory footprint and low CPU usage, then use C over C++. But then again
C++ compilers are fast catching up to C compilers in terms of executable
size and speed, so the point may come where we may have to say "why not
just merge C with C++" since there's so much diffusion back and forth.
--
Donn
dmm125 AT bellatlantic DOT net
- Raw text -