Topic: Suggestion to c++ standard
Author: "Dmitry M. Potapov" <dima@florin.msk.su>
Date: 1996/03/22 Raw View
Dear readers,
Please let me explain the problem, which solution I think
is in adding something to the c++ standard.
Many of us use old C libraries, and the possibility to use these
libraries is one of the reasons of C++ success.
There exists a problem in C which often leads to terrible results.
The problem is in program startup and initialization of global
variables.
We cannot define the first operator in our programs and
this is terrible.
Sometimes our programs cannot reach main(), and sometimes (and it is even
worse) programs reach main() with global variables initialized
incorrectly.
There is nothing good in undefined behavior, and this must be fixed
in some way, I think.
I don't say I have a solution,
but it seems to me that it is based on introducing
classes TProgram, TProcess (for multithreading environments),
TLibrary with some virtual methods as a part of c++ standard.
Concrete instances of these classes would be binded with
libraries etc in some way and startup/initialization would be
completely defined.
I'm not a specialist in compilers/linkers construction,
but I love C++ and I want it to be better and live longer.
These changes to c++ may introduce new incompatibilities
with c, but would definitely improve the language.
Thanks,
Dmitry Potapov, dima@florin.msk.su
--
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]