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

List:       kde-devel
Subject:    Re: C++ exceptions
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2005-12-05 12:26:57
Message-ID: 200512051326.57225.mbuesch () freenet ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 05 December 2005 13:22, Henning Westerholt wrote:
> On Mo, 5.12.2005, 12:23, Michael Buesch sagte:
> > Although my opinion might not count much here, I think the
> > exceptions are one of the big _misfeatures_ of the C++ language.
> > They bloat code. Nothing else.
> 
> Sorry, i must protest here. Exception in c++ could be very useful, and are
> also used within the kde project, for example in khtml.
> 
> > Everything done with exceptions, can be done with normal return codes.
> 
> You are right, but the solution with exception is easier to use (and to
> code). The errors are also more understandable, for example compare
> "return code -4" to "System.IO.FileNotFoundException".

return -ENOENT;

It is all about _coding_ in a clean way. If you choose the return values
by random, well...

> If you have sometimes worked on a nontrivial project in java, you would

I have no idea about java. Maybe exceptions are more useful in java.

-- 
Greetings Michael.

[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