This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with shared libraries, exceptions, and global constructors


In article <20030819002528.GA6344@redhat.com> you write:
>If, from ANYONE's point of view, there is a cycle in the dependency
>graph, then there exists NO fully correct initialization sequence.
>
>Period.
Nonsense. Before I learnt C++, I've built several projects with apparently
cyclic behavior in the initialisation sequence. They worked just fine.
The key is that there is NO cycle at the code level, but a cycle in the
code decomposition at the file level.


>And, if I may be so bold, from a software engineer's point of view,
>if there exists such a cycle, then the project is badly designed.  It
>is a sign of layering violations or poor problem decomposition.  If
>the application works at all, it will be by accident.  

Not necessarily. Some designs will exhibit this natural cycle.
It is quite possible to write independent components, that can be taken
through unit testing, and only have the final composition exhibit some
cycle behavior. This will happen more frequently with high-level languages.

>If a developer cannot be bothered to create the dependency graph at
>all, merely by linking each library to the libraries it uses, it is
>not a matter of complexity, it is a matter of laziness.

Well, this whole problem is what triggered the existence of libtool.
When I see the resulting mess of a shell-script, I have no sympathy,
indeed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]