[comp.lang.c++] Summary of global constructor respo

grunwald@m.cs.uiuc.edu (10/28/88)

This is, actually, an area of C++ that needs a lot of work.

There should be some way to specify the ordering of static modules and how
those modules get initialized. This specification should occur either
at compile time or link time.

As it is, I tend to malloc many structures that I chould otherwise statically
allocate.

bs@alice.UUCP (Bjarne Stroustrup) (10/29/88)

m.cs.uiuc.edu writes:

 > There should be some way to specify the ordering of static modules and how
 > those modules get initialized. This specification should occur either
 > at compile time or link time.

This is easy to say, but hard to do. How would you specify it? In the language
or in the environment? If not in the language what could you assume about
the environment? The scheme we decide on, if any, must be able to work even
when incremental linking is used.

 > As it is, I tend to malloc many structures that I chould otherwise statically
 > allocate.

It is wise often wise to use the free store if you depend on order of construction. I hope that by `malloc()' you meant `new'.