|
local contentslocal f = io.open("myfile")
do
contents = f:read()finallyf:close()
endImho this miss the point even more since the closing stuff is very distant from the initialization. What is the difference with just calling "close" at end of the scope?The intent here is that the code in the `finally` section is called regardless of how the scope is exited: normal exit, exception, coroutine.close, etc.