New iteration over the ev++ improvement patch.

Marc Lehmann schmorp at schmorp.de
Tue Jan 22 18:58:24 CET 2008


On Tue, Jan 22, 2008 at 03:31:12PM -0200, Leandro Lucarella <llucax at gmail.com> wrote:
> > The main drawback of using exceptions is using stdexcept, not specifying
> > what a function throws.
> 
> Well, I think you did a little more than what I expected. You made
> throwing bad_loop non-conditional. I think it make no sense to keep the
> conditional compilation just to set if std::runtime_error is used or not.

Well, its the difference between rxvt-unicode compiling or not (it doesn't
use the standard library), which I consider extremely crucial :)

> The main point of the conditional compilation were to avoid the overhead
> of exceptions, not the overhead of an (standard) include.

What overhead of exceptions? Not calling throw doesn't, in general, avoid
any overheads compilers add (and removing the throw specifications will,
at best, introduce overheads because the compiler now has to deduce that
no exceptions will be thrown (which is impossible in this case)).
   
The runtime overhead is virtually nonexistant because you never really
throw it except in, well, very exceptional conditions.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list