lua-users home
lua-l archive

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

HyperHacker <> writes:
> One of my favourite features of Lua is you can replace anything. You
> could add support for reading zip files transparently by replacing
> and friends with your own wrappers, for example. Talk about
> "drivers" that seem to be meant to define how functions behave seems
> a bit redundant when you can change their behaviour already by
> replacing them.

One has to be a bit careful how one goes about it though, since it's
not uncommon to cache module functions in local variables... so any
wrapping needs to be done in code that is guaranteed to run before
anything uses the wrapped functions...

> Also, I'd definitely want "chdir" rather than "cd". Readability is good.



The car has become... an article of dress without which we feel uncertain,
unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]