
INFO-ADA Digest - 24 Nov 1993 to 25 Nov 1993
Ben,
Further to Robert Dewar's points about (un)standard C libraries.
Try having two subprograms in C with the same name but in
different libraries (given the liklihood of a developer on a
large project not searching every archive and object on his
project-wide system this is quite plausable). When it comes to
linking, most linkers will take the first "matching" object that
they find and then include this. Some will only resolve the
object names down to the first 6 characters! Trying to track down
why your "goodness-in, garbage-out" programme is doing what it is
can be, no it {*filter*}y well is (-:, quite a headache. (I know I've
had to find why an stoi function wasn't working correctly).
The major advantage to Ada here is that you must be informed when
such a clash is going to occur. The mechanisms for the resolution
of overloading are well-defined. Furthermore, the resolution of
an object must be made throughout all libraries, and not just
stop at the first one it finds that matches the required name. The
sequence of the linked objects/archives will have no bearing on
what is "put into" your final executable.
P.S. Hope everyone had a good Turkey Day! 'Avagoodweegend. I'm
off to have fun in Munich!
Bob Wells "C makes it easy for you to shoot yourself in
the foot. C++ makes that harder, but when you
do, it blows away your whole leg."