gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Nit


From: Tom Lord
Subject: Re: [Gnu-arch-users] Nit
Date: Wed, 22 Oct 2003 07:54:32 -0700 (PDT)



    > From: Momchil Velikov <address@hidden>

    > Tom> In other words, on the issues of safety and convenience, there is no
    > Tom> advantage of exceptions over error-codes: they require the same work
    > Tom> at every call-site and admit equivalent static and dynamic checking.

    >   No they don't.  In the exceptions case work is required only when an
    > exception is thrown, i.e. on the exception path, while with explicit
    > error checking work is required on the "main" path.

(You mean run-time cycles?)  No, that's a difference in implementation
techniques.  Both can be implemented so as to require no run-time
costs unless an error occurs -- but neither can be implemented without
those run-time costs in portable C.

In C, there'd be no checking of error codes with an exceptions
approach, but there'd be plenty of calls to setjmp to make up for
that.

-t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]