Mail Archives: djgpp/2000/05/17/11:07:35
Alexei A. Frounze <alex DOT fru AT mtu-net DOT ru> wrote:
> I can define my own classes instead. Just a C++ compiler is needed, no C++
> library. Stream I/O could be implemented w/o C++ library, complex stuff,
> strings, etc. can also be done w/o that library.
Sure :-(. And you would be willing and able to write your own I/O
library for all of the dozens of computing platforms out there
yourself, wouldn't you? Or use libraries written by others, which
almost certainly would end up incompatible with each other, on
different platforms?
Sorry, Alexei, but I think you must have misunderstood a fundamental
detail about what high-level programming languages are meant for. And
C++ is just about as high-level as it gets. A big part of the game is
that *not* every programmer re-invents the wheel of how to do I/O on
his target machine. Without code-reusability (as in: every program can
use a library of support functionality), software engineering would be
in even worse a state today than it already is.
The particular problem with the C++ standard library is that it's
*huge*, and very hard to implement correctly. Many compiler/library
implementors are still struggling to get it right.
> So why should I use C++ library, if it's not standartized?
It *is* standardized. But most of the compilers haven't implemented
all of that standard, yet.
> Btw, when C++ was invented? How long we have it w/o of standard?
At least half a decade. Maybe 10 years. To give some numbers:
Borland's first 'big' C++ compiler, BC++3.1, dates back 1992 or so.
The key problem is that the definition of the language itself and also
the library has constantly been changing all the time. It never really
came to a halt until the ratification of the ISO standard late in
1998. This kept the compiler writers extremely busy all the time if
they wanted to keep up with the state of the art.
> size_t is not a problem. Btw, what so I need size_t for, if both size_t and
> int equal the same machine word?
*If*. But how on earth is a program supposed to know if that condition
holds, on the compiler it's being put through?
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -