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

List:       kde-devel
Subject:    Re: OT Re: reason behind fno-exceptions?
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2001-08-05 18:15:27
[Download RAW message or body]

(I tried to send this from work but mail.kde.org doesn't seem to like my 
employer's mailhost as it kept resetting the connection)

On Tuesday 31 July 2001 15:04, Allan Sandfeld Jensen wrote:

> Hmm. I guess you havent disassembled a program that DOESNT use exception
> with and without fno-exceptions.

Indeed I haven't, and I don't want to.

> The overhead they talk about [...]

I don't care about overhead unless profiling tells me to. What I care about 
is code clarity and ease of maintenance.

> code to deal with this. If you dont expect this and is programming
> low-level binaries or drivers, this is a serious hazard.

I'm not programming low-level binaries or drivers. If I were, that would of 
course impose some drastic requirement on my programming, but right now this 
is not the case.

> Whats even more,
> since how exceptions are implemented are not general, you cant count on any
> specific behavior.

How ? Their behavior is very well defined.

> A library shouldnt cast exceptions since this breaks
> non-exception handling user code, or insert various handlings per default.

I some code uses a library which throws exceptions and doesn't handle them, 
then this code is broken, not the library.

> anyway, it's all simulated. That's a feature!! And still, even in java,
> it's recommended not to use exceptions, becouse they couse a serious
> performance problem. If you need an exception look at you program once
> more, and see how you can avoid it.

I totally disagree with this state of mind. It's only an instantiation of the 
age-old "Don't use feature X because of overhead (or bad things happenning to 
you)". I've seen it instantiated for OO programming, virtual methods, 
templates, multiple inheritance, even things as fundamental as graphic 
toolkits and operating systems. Time *always* proves it wrong.

> We dont need it. KDE can handle events in different (and better) ways..

Look at QXml classes for an immediate example of a case where we do need 
exceptions. Again, that the concept is badly implemented in one compiler 
doesn't mean it's fundamentally broken.

-- 
					Guillaume.
					http://www.telegraph-road.org
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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