[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Nit
From: |
Andrew Suffield |
Subject: |
Re: [Gnu-arch-users] Nit |
Date: |
Mon, 20 Oct 2003 15:14:35 +0100 |
User-agent: |
Mutt/1.5.4i |
On Mon, Oct 20, 2003 at 08:21:13PM +1000, Robert Collins wrote:
> On Mon, 2003-10-20 at 18:56, Thomas Zander wrote:
> > Its all the things that people use Exceptions for; since it allows for bugs
> > to be made without creating non-sane conditions, which allows creating
> > software bug-free the first time around.
> > You are right that c can do this; but most developers just don't because
> > its
> > so damn hard!
> >
> > How often is a malloc done without a check if it succeeded? Do a grep to
> > find out, same with file-open and all those nice little problems.
>
> Y'know, reading hackerlab would be a very good start for you, as you
> appear to be talking from a position of ignorance [of tla's internals]
> rather than one of knowledge.
>
> Oh, and as for exceptions being 'all that' ? Exceptions don't prevent
> bad state in objects, they don't prevent bugs, all they do is ensure
> that cleanup routines have a chance at trapping abnormal events within
> the same process.
Most of the time they don't even do that.
All that exceptions normally give you is a more descriptive error
message.
If you want to actually handle the error and continue in a sensible
fashion, then you need to design your interface to clearly and
usefully define the error states it can cause, and probably provide
some cleanup/restart handling. Once you've got that, you don't need
exceptions any more, because it's just part of your library
interface.
--
.''`. ** Debian GNU/Linux ** | Andrew Suffield
: :' : http://www.debian.org/ |
`. `' |
`- -><- |
signature.asc
Description: Digital signature
- Re: [Gnu-arch-users] Nit, (continued)
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/19
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/19
- Re: [Gnu-arch-users] Nit, Joshua Haberman, 2003/10/19
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/19
- Re: [Gnu-arch-users] Nit, Thomas Zander, 2003/10/20
- Re: [Gnu-arch-users] Nit, Alexander Deruwe, 2003/10/20
- Re: [Gnu-arch-users] Nit, Thomas Zander, 2003/10/20
- Re: [Gnu-arch-users] Nit, Robert Collins, 2003/10/20
- Re: [Gnu-arch-users] Nit,
Andrew Suffield <=
- Re: [Gnu-arch-users] Nit, Thomas Zander, 2003/10/20
- Re: [Gnu-arch-users] Nit, Michael Teichgräber, 2003/10/20
- Re: [Gnu-arch-users] Nit, zander, 2003/10/20
- Re: [Gnu-arch-users] Nit, Michael Teichgräber, 2003/10/20
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/20
- Re: [Gnu-arch-users] Nit, Andrew Suffield, 2003/10/20
- Re: [Gnu-arch-users] Nit, Mark A. Flacy, 2003/10/21
- Re: [Gnu-arch-users] Nit, Andrew Suffield, 2003/10/21
- Re: [Gnu-arch-users] Nit, Dustin Sallings, 2003/10/20
- Re: [Gnu-arch-users] Nit, Andrew Suffield, 2003/10/20