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

List:       kde-devel
Subject:    Re: C++ exceptions
From:       Michael Pyne <michael.pyne () kdemail ! net>
Date:       2006-06-16 7:33:40
Message-ID: 200606160333.41128.michael.pyne () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday 16 June 2006 03:09, taipan@omnidatagrup.ro wrote:
> Hi kde-devel,
>
>    I DON'T want to start this war again. I want to post some facts.
>
>    I read this (http://lists.kde.org/?l=kde-devel&m=113372566628649&w=2)
> thread and I want to test it.
>
> Here is the conclusions:
>
> ---------------------------------------------------------
> -   QT with exceptions      QT with no-exceptions       -
> ---------------------------------------------------------
> Compile time (seconds):1044.1           1023.8          20.3(1.98%)
> bin debug size (bytes):70162927         68761626        1401301(2.04%)
> bin strip size (bytes):9843688          8617088         1226600(14.23%)
> lib debug size (bytes):175116450        172857882       2258568(1.31%)
> lib strip size (bytes):17940104         15909000        2031104(12.77%)
>
> Now the question is: For 15% of extra size, exceptions will make apps 
> - more stable and 
> - more clean ? 

It depends, and it depends.

Personally I find that programming with exceptions is a great way to keep 
certain types of code paths clean while still successfully dealing with user 
errors.

BUT: Once you decide to use exceptions, you *have to* buy in entirely.  You 
have to use classes which are exception-safe (or at least exception-neutral), 
and you need to make sure that code you write is exception-safe (For example, 
ensuring that you release mutex locks correctly in the prescence of 
exceptions).  It isn't necessarily hard, but you do need to keep it in mind.

Or in other words, I wouldn't even worry about the size argument too much, 
because exceptions imply that they are only triggered in "exceptional" 
situations, where speed isn't the major concern.

Regards,
 - Michael Pyne

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.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