lua-users home
lua-l archive

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


Hi,

All we need to do is come up with a finalization mechanism that is
safe and we are all set.

I still think that we can do that with finalizers. As long as each
object has a proper finalizer (i.e., a __gc metamethod), all we have to
do in case of errors is to call collectgarbage() to finalize what was
left.

I can buy that. But only for hard errors. The return_on_error idea would
benefit from a finalization function. In fact, I would drop my use of
exceptions altogether in LuaSocket if I could replace it with a simple
soft-error policy. I only use exceptions because I don't want to
propagate the errors up the call stack by hand.

[]s,
Diego.