lua-users home
lua-l archive

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


On Mon, Apr 15, 2013 at 11:51 AM, Philipp Janda <siffiejoe@gmx.net> wrote:
-   no one can mess with your functions once you have them copied (whether you consider this a good thing depends on how you think about monkey patching)

This particular point does depend on the order of require() calls, of course.

This is good defensive programming. These are good points, and the extra effort is (a) worthwhile and (b) mostly automatable.

As for assert(setmetatable), it's less painful to make this a 'compile-time' problem with an appropriate static analysis tool.  And I suspect that the 'luac' trick could be covered as well.