From kde-devel Mon Dec 05 12:26:57 2005 From: Michael Buesch Date: Mon, 05 Dec 2005 12:26:57 +0000 To: kde-devel Subject: Re: C++ exceptions Message-Id: <200512051326.57225.mbuesch () freenet ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=113378567330777 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0178122904==" --===============0178122904== Content-Type: multipart/signed; boundary="nextPart7514420.ohBnrPClYA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart7514420.ohBnrPClYA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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. >=20 > Sorry, i must protest here. Exception in c++ could be very useful, and are > also used within the kde project, for example in khtml. >=20 > > Everything done with exceptions, can be done with normal return codes. >=20 > 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. =2D-=20 Greetings Michael. --nextPart7514420.ohBnrPClYA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDlDIRlb09HEdWDKgRAvVzAJ9Wv45Hu4ZTxkHd/RyF/cKyVv0/EQCfT1F3 aEvytbugypYzzgPfIG2Qm3w= =d3aV -----END PGP SIGNATURE----- --nextPart7514420.ohBnrPClYA-- --===============0178122904== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0178122904==--