lua-users home
lua-l archive

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


>>>>> "Doug" == Doug Currie <doug.currie@gmail.com> writes:

 Doug> If we're adding keywords...

 Doug> local contents
 Doug> local f = io.open("myfile")
 Doug> do
 Doug>     contents = f:read()
 Doug> finally
 Doug>     f:close()
 Doug> end

 Doug> This obviates the need for __close handling, and makes all the
 Doug> discussion about panic handlers and __gc moot

Only in the sense that my objections would go away because you had made
it impossible for me to even think about using your proposed lua version
in my application.

 Doug> since we would have control

The _lua code_ would have control, which is exactly the wrong thing in a
sandbox environment - the SANDBOX must be in control, not the
user-supplied (and therefore untrusted) code.

I raised this point back when the <toclose> proposal allowed the
provision of a function value (and therefore arbitrary lua code).

-- 
Andrew.