[bind10-dev] 2009-10-08 BIND 10 meeting
Michael Graff
mgraff at isc.org
Thu Oct 8 20:14:08 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christos Zoulas wrote:
> 2. No exceptions at all. Allows code to be compiled with -fno-exceptions
> (and since you probably are not going to use rtti -fno-rtti)
> which makes the code a lot more efficient and embeddable. Since you
> are not going to expose exceptions in the api anyway, why don't
> you just abort() on such errors, or log+exit(). Finally c++
> exceptions are unchecked and make programming a lot more difficult.
> (alexandrescu's c++ 101 rules, guidelines and best practices is
> a good reading).
abort() or log+exit() are specifically what we are trying to avoid.
The problem is unrolling where you are. BIND 9 used return codes, so
each and every operation ended up using:
status = foo();
if (status != ISC_R_SUCCESS)
... do stuff ...
In this case, we might be able to avoid some of that using exceptions.
The trick is to find where we really want one and where we really don't.
If we take exceptions off the table, I say we write the whole thing in
Python or Ruby. Removing major features of the reason we chose C++
would mean we chose poorly.
- --Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrOSBAACgkQ+NNi0s9NRJ1GHwCgkeEZ8Yu2gfgs617H931VOf2Y
1wsAnjMfsNrxQgvEP2xQugLpufRLMvy3
=TZyx
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list