lua-users home
lua-l archive

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


Am 15.04.2014 00:00 schröbte Enrique Garcia Cota:

I think we both agree that monkeypatching isn't infinitely precise. Say the
user wants to modify the way *half* of the functions in the module use
`sum`. Unless the module is prepared for it, the only solution is
re-writing half the module functions (with or without monkeypatching) - Lua
is not Lisp.

If I understood you correctly, your opinion is: since it's difficult to use
properly, you want "every change to have the least impact possible" - if
you want to make lots of changes, you'll need lots of monkeypatches. I can
understand that.

Yes, but I don't need more monkey-patches than without local aliases. The only thing that changes is that I can define which modules should use the monkey-patched code, and which shouldn't. Which is a good thing, because monkey-patching can break code that is not aware of the changes. I agree, it's not infinitely precise, but some precision is better than none.


Enrique (kikito / @otikik)


Philipp