1 Oct 2007 18:51
Re: Re: Exceptions Overhead (Was: How to refactor argument validity chec
Ricardo Mayerhofer <ricardo <at> ssitec.com.br>
2007-10-01 16:51:04 GMT
2007-10-01 16:51:04 GMT
Hi Ron,
I'm curious about the better ways you mentioned, could you please
describe it further?
Ricardo
Ron Jeffries escreveu:
>
> Hello, Avi. On Sunday, September 23, 2007, at 3:27:49 AM, you
> wrote:
>
> > --- Ron Jeffries <ronjeffries <at> ...> wrote:
> >>
> >> (...) I'm suggesting that there are other alternatives than just
> >> 1. return wrong value;
> >> 2. do nothing;
> >> 3. throw exception.
> >>
> >> I would suggest that it can be valuable to think about this, and to
> >> look for numbers 4 and beyond. (...)
> >>
>
> > Once I used to think of exceptions as a valid way for a function to
> > communicate a message to it's caller. Now I know better about runtime
> > overhead (and avoid using exceptions unless I encounter an
> > exceptional situation), but all in all it seems like exceptions could
> > still provide a rather neat way for a function to communicate a
> > message up the call-stack.
>
> > I guess if there were a similar mechanism without the runtime
(Continue reading)
RSS Feed