lua-users home
lua-l archive

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


On Tue, 27 Sep 2011 11:08:45 +0200, steve donovan wrote:
On Mon, Sep 26, 2011 at 9:06 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
local f = open_connection()
finalize(function(e)
  f:close()
end)

Any feelings/opinions about finalizers?

I like them, but I like your "little consistency" even more
since I keep writing pcall(t:f) instead of pcall(t.f,f)...

--
Pierre Chapuis