[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Try-catch and try-finally
- From: Sean Conner <sean@...>
- Date: Tue, 31 May 2016 13:38:33 -0400
It was thus said that the Great Alexey Melnichuk once stated:
> > Ah, but we use pcall for that - try/except in Lua would be sugar for that idiom.
> > Sugar is fine when it does not have any runtime costs (e.g. a:f(b) is
> > short for a.f(a,b)) but in this case a closure would be silently
> > constructed.
> May think about short from to define function. For me real problem
> with `try(function()...` is that word function is too long. I do not
> bother much about create closure and do 2 more calls. At least in most
> cases. But word function is really annoying :)
I have become convinced that the reason LISP has macros is to hide all the
calls to (lamba ...).
-spc (So you might want to look into MetaLua ... )