[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: On <close> and <const>
- From: Rodrigo Azevedo <rodrigoams@...>
- Date: Sat, 5 Oct 2019 10:42:29 -0300
Why not use a simpler model for <close> variables as a simple
mechanism of a predictable call of __close() from its respective
value?
e.g.:
do
local x <close> = whatever
x = something -- it's OK
local y <const,close> = true
-- y = false -- compile-time error
-- going out-of-scope
-- call __close(), if it exists, from 'something' value.
-- call __close(), if it exists, from 'true' value.
end -- end-of-scope
Namely, it does not imply <const> or checks before variables are out-of-scope.
If we want <const>, just explicitly declares it.
--
Rodrigo Azevedo Moreira da Silva