lua-users home
lua-l archive

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


On Tue, Apr 9, 2013 at 8:28 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2013/4/9 steve donovan <steve.j.donovan@gmail.com>:

> It's just that assigning _ENV to something else strikes me as magicky as
> module()

So it is. You're replacing the motherboard. And the underscore-caps
appearance warns you about it.


To my newbie eyes and sensibilities, `setfenv` was a giant, powerful and awesome wart on the language. It was something that I had assumed was proceeded with "debug." Like setjmp, I'd never be smart enough to use it...

_ENV is awesome and simple and I cry for other languages that lack it. I use it every day and in ways that make things clearer, not more complicated.

So, it's mostly the same feature, but the design of the feature's interface makes the language better. These things are critically important and I know that there is a great appreciation of design, on this list. 

I look forward to the day when the latest and greatest LuaJIT comes back to parity with Lua, even if it is in a way that retains more backward compatibility.  I see it as one of the few (only?) unfortunate things remaining in the Luaniverse, now that some excellent work is taking place on the desktop scripting ecco-system. Then again, standard Lua 5.2 works great and our first project with it has been nothing but a joy.

I think if you're starting off on something new, there really isn't a choice to make, especially since beating older modules into submission has turned out to be "not a big problem". 5.2 ftw.

The above is just a reflection of priorities and that's why smart people do different things...

-Andrew