lua-users home
lua-l archive

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


2014-08-12 14:53 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
> 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.

It has been applauded by some, including this [1]:

   It's refreshing to see Roberto talking about what to REMOVE from
   the next version of Lua instead of the feeping creaturism that
   dominates most language development.

[1] http://lua-users.org/lists/lua-l/2014-04/msg00205.html