Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-10 12:34:51


From: "Jesse Jones" <jesjones_at_[hidden]>

> >if(f) f();
>
> 1) It parallels what you would do with an ordinary function pointer.
> 2) Why call a function if it's empty?

Yes, this makes sense. But introducing undefined behavior still feels
somewhat wrong to me. Undefined behavior is usually introduced when validity
checks (a) will have severe performance impact, or (b) are impossible.
Neither of these applies.

> Exceptions should be used for
> errors. This smells too much like using exceptions to control program
> flow.

:-)

Exceptions _are_ a control flow mechanism, no more, no less.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk