help-bison
[Top][All Lists]
Advanced

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

Re: C++ exceptions


From: Hans Aberg
Subject: Re: C++ exceptions
Date: Sat, 24 Jul 2004 14:47:46 +0200

At 12:12 +0200 2004/07/24, Detlef Vollmann wrote:
>Yes, C++ exceptions are essentially the (required) replacement
>for the C longjmp mechanism.

A typed version, that is.

>Unfortunately, the implementation of exception are generally
>optimized for the no-throw case, i.e. it is assumed the throwing
>an exception is really an exceptional case and in that case a
>higher overhead for actually throwing an exception is accepted
>for a lower overhead in the no-throw case.

Right. C++ is heavily biased towards that exceptions should be exceptional.
I point out, by the example above of essentially runtime closures for
loops, that this need not at all be so: In fact, one can use exceptions for
doing perfectly normal dynamic programming.

  Hans Aberg






reply via email to

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