lua-users home
lua-l archive

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


On Jan 31, 2013, at 8:07 AM, steve donovan <steve.j.donovan@gmail.com> wrote:

> On Wed, Jan 30, 2013 at 10:16 PM, Petite Abeille
> <petite.abeille@gmail.com> wrote:
>> Yes, this is all for 5.2. And yes, _ENV is special in 5.2 :)
> 
> Very special!  In fact, I am going to ignore it for a while, except
> perhaps as an idiom for creating modules. I'm not seeing much use of
> it in the wild,

Hmmm… I beg to differ… I, for one, have embraced our new _ENV overlord… mostly for module indeed, but also to emulate setenv/getenv at time… in my opinion, ignoring _ENV in 5.2 renders undefined variable spotting utterly useless [emphasis added for dramatic effect] … oh, well… this exercise took no time to turn into The Charge of the Light Brigade…. :P

> Your first TestGlobal.lua is now working consistently, due to improved
> handling of SETTABUP.

Fixed indeed. Thanks :)

>> The  Berezina [2] of Computer Science: Static Analysis Of Dynamic Languages
> 
> Hah, indeed!  Since I have no imperialistic urges, I'll concentrate on
> reliability.  I had this bright idea to analyze Lua OOP-style code by
> making 'self' a reference alias to the owning table, but it would only
> work under certain conditions.  There are too many ways to peel that
> avocado in Lua…

(^ … in military terms, this is known as "mission creep"… )

Yeah, well… it would be nice if any one of the tools dedicated to detecting undefined variables did indeed detect undefined variables… nothing more… nothing less… but none does reliability… oh, well...