[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2, setfenv and the C API
- From: Alexander Gladysh <agladysh@...>
- Date: Mon, 11 Jan 2010 03:13:36 +0300
>> Well, why not just do require("debug") then? "Moral" considerations
>> should be the same.
> Firstly because it would not be accompanied by the other baggage associated with "debug", and secondly because it would recognize a voluntary decision by the person administering the Lua environment to make those functions available to code within that environment.
> This decision seems to indicate a philosophy of encapsulation by default, while still allowing users and embeddors to choose to expose or bridge information into other environments to the degree they wish and no more.
Well, yes, but isn't the existance such module would be a "hack
against the Lua 5.2 language"? Almost the same as if one would create
a module which would allow people to bypass the __metatable
protection.
Note that I'm not advocating the removal of get/setfenv, but merely
discussing the "what if" Lua 5.2 final *is* released without them.
Alexander.
- References:
- Lua 5.2, setfenv and the C API, Brett Nash
- Re: Lua 5.2, setfenv and the C API, Alexander Gladysh
- Re: Lua 5.2, setfenv and the C API, Leo Razoumov
- Re: Lua 5.2, setfenv and the C API, Alexander Gladysh
- Re: Lua 5.2, setfenv and the C API, Nevin Flanagan