Does static initialization fiasco occurs only in c++?

95 views Asked by At

I just found out that there is static initialization fiasco problem in c++, I am just curious, is this only c++ problem? or maybe this problem is already fixed even in c++?

1

There are 1 answers

0
Alex Guteniev On

In Delphi, each unit can have initialization and finalization section. (Unit is single source file).

Provided that there are no circular dependencies between units, initialization of dependency would come before than initialization of dependent module. Finalization order is reverse.

I think this is an example of that the problem could have been avoided.