[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde
Subject:    RE: Problem compiling kdevelop application on SGI
From:       "Santiago Burbano" <santib () mtservicios ! com>
Date:       1999-10-13 18:29:02
[Download RAW message or body]

> > I have a couple of questions though.
> >
> > 1. Why does the shared library have to be compiled with the same
> > compiler?
>
> There is no standard which covers the format of the object files/shared
> libraries of a C++ program. Therefor each compiler uses its own way of
> dealing with this stuff and as a result you can't mix compilers.
>
> You don't have this problem with C. It's IMHO one of the bigger
> disadvantages of C++ at the moment.
>
> Cheers,
> Waldo
>

This is not a disadvantage. In fact, it's a good thing. It allows
programmers to detect a lot of troubles at compile time, instead of having
users reporting tons of bugs that really aren't. The problem comes with the
fact that there aren't two compilers that do things the same way, specially
when code optimizations are used. If an optimization is used, let's say, for
faster function arguments passing in a program, and this optimization is not
used (or used differently) in a library, a lot of weird things could happen
(from coredumps to system locks). If libraries are made incompatible, the
problem will be detected at compile time, before any harm is done.

The overhead that would come from autodetection at run-time would make
systems muuuuuuch slower (sometimes it's just impossible).

C is a much simpler language, so, easier to make standard, but features like
overloading, polymorphism, ... in C++ make the language so complex that it's
impossible to standardize  a 'way of doing things'. And, even if possible, I
like innovation, and IMHO, stone-carved standards and innovation do not get
along very well. :)

Santiago


-- 
Send posts to:  kde@lists.netcentral.net
 Send all commands to:  kde-request@lists.netcentral.net
  Put your command in the SUBJECT of the message:
   "subscribe", "unsubscribe", "set digest on", or "set digest off"
PLEASE READ THE ARCHIVED MESSAGES AT http://lists.kde.org/ BEFORE POSTING
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic