lua-users home
lua-l archive

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


For a programming language the more answers to questions in the style of "why is this done that way?" the proper answer starts with "this is best explained historically, first there was, then, etc. ..." the more awkward the language becomes as whole.


On Tue, Aug 12, 2014 at 2:53 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Tue, Aug 12, 2014 at 2:48 PM, Axel Kittenberger <axkibe@gmail.com> wrote:
> sed -i "s/\b[_G]\b/[_ENV]/g" *.lua

Ah, but that's not a correct substitution - _ENV starts out as _G, but
may change.  For the idiom where one's doing _G.print in a module with
new _ENV the fix would be the 'local _G = _ENV' at the top that was
suggested.

But really, why?  This mania for deprecation puzzles me.