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

List:       kde-devel
Subject:    Re: -fno-exceptions?
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-05-28 17:02:29
[Download RAW message or body]

listasj@cban.com wrote:
> 
> >
> > I cannot agree. Do we really need to punish every KDE user with bloated
> > libraries just because a chat-program is written in a way incompatible with the
> > rest of the programs?
> >
> > Exceptions are a cool tool on a technical level, but if it leads to such
> > bloated libraries we should avoid it like hell.
> >
> 
> Then let's remove kSirc from CVS.  Exceptions are fundamental to kSirc it
> uses them for it's main parsing loops (no, their use is not only for error
> handling).  Exceptions are an important C++ feature and going backto
> setjmp/longjmp is plain stupid.

> In due respect through, egcs is starting to use exceptions (example of new
> was given earlier) so you're not going to be able to get away from them.
> The only bloat is in disk space usage, and with 8 gig disks selling for
> < $300 canadian I really don't care anymore. (if you don't beleive me,
> read up on linux memory managment)

Increased object size means increased code size which limits performance:
you can run less programs less fast with the same amount of memory. 
Increased code size also means that launching an application takes longer:
the resulting system will feel slower.

Exceptions are a usefull C++ feature but it is highly impractical to
support exceptions within the KDE libraries.

The 'new' example is interesting but has no practical implications. Linux
tends to overcommit on memory allocations, this means that an allocation 
never fails but that processes get killed when you run out of swap space.

A constructor could of course throw an exception but none of the classes
in current KDE libs do that.

I am quite strong opposed to support exceptions in KDE libs. However, I 
think it should be possible to use exceptions in single applications that
wish to do so. It's then up to the application to take care that it doesn't
try to throw exceptions through signals. (And possibly take other 
precautions as well)

Cheers,
Waldo Bastian
bastian@kde.org
-- 
KDE, Making The Future of Computing Available Today        http://www.kde.org

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

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