[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Try-catch and try-finally
- From: Alexey Melnichuk <alexeymelnichuck@...>
- Date: Tue, 31 May 2016 15:37:11 +0300
> 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
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 :)
Это сообщение проверено на вирусы антивирусом Avast.