lua-users home
lua-l archive

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


I haven't done sandboxing yet, but here are my 2 cents:
(*) I guess most users won't care or won't need to know about _ENV.
     But those that do are unlikely to upgrade, as they'll have to
     ditch their sandboxing frameworks and redesign them from scratch.
Why do you think so? 'setfenv' and 'getfenv' implemented for _ENV aren't compatible with 5.1 analogs only when the _ENV upvalue isn't used. I doubt this will break much. Meanwhile, I think _ENV would make new sandboxes easier to make. _ENV is certainly very good for persistence, especially Pluto-like custom __persist functions.

As for __pairs and __ipairs, they have potential to break sandboxing or persistence by making it possible to fool the functions of framework that were written for 5.1.

--
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru