lua-users home
lua-l archive

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




On 24/06/15 02:11 PM, Roberto Ierusalimschy wrote:
As I replied on IRC; I think that lexically scoped metatables for the
base types are a much better idea.
I even coded up a proof of concept:
https://gist.github.com/daurnimator/dedd793e6f9b1f8d6b0c
(obviously if such a feature made it into PUC-lua, the `debug` calls
would be unnessecary)
Do you have an idea about how to implement it efficiently and correctly?

-- Roberto

Probably something like 5.1's setfenv()/getfenv(), but with bytecode instead? https://github.com/SoniEx2/sexlua/wiki/Changes-from-Rio-Lua#op_pushpopfenv-51-like-functionchunk-envs-but-more-powerful

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.