lua-users home
lua-l archive

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


It was thus said that the Great Andrew Starks once stated:
> On Thu, Sep 18, 2014 at 1:22 PM, Tim Hill <drtimhill@gmail.com> wrote:
> 
> > It really comes down to "where is the code that handles this condition?".
> > If it's close to the code that caused it, then the whole apparatus of
> > exceptions or pcalls() is just an ornate way of returning an error code
> > from the callee to the caller. If it's far away, then you WANT an exception
> > model so that you can avoid the absurd "ripple through" model where error
> > codes have to be returned up a winding call stack.
> >
> > And yes, there are some nasty examples that sit right in the middle, which
> > is why everyone argues for hours about stuff like this :)
> >
> 
> If it doesn't work out, I'll invent some other method, and then realize
> that I've accidentally invented a poor-quality replacement for `nil,
> err_str`.

  You might like reading about Common Lisp's conditions and restarts:

	http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html

  -spc