lua-users home
lua-l archive

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


On Aug 6, 2010, at 10:30 PM, Jonathan Castello wrote:

>> Hmmm... this seems to be the same line of reasoning leading to the (short) disappearance of ipair... spending dollars to save pennies... in the same way as ipair seems to be back in the latest work version, I hope reason will prevail and the module function will be back as well.
> 
> This probably doesn't apply to everyone, but I can't say I've ever
> used module().

Fair enough.

> I'd rather have direct control over where the module
> table goes, and not rely on magic.

Well, not much magic, just a bit of policy.

" Despite our “mechanisms, not policy” guideline for Lua, we defined a set of policies for writing modules and loading packages, and made small changes to support these policies better."

http://www.lua.org/doc/hopl.pdf

> ipairs() isn't very magical,

I'm not quite sure where this notion of "magic" comes from? Is that related to its use of setfenv? Is the demise of module related to setfenv passing out of favor?

> it's very easy to use, and the only
> drawback is efficiency. I find module() weird in comparison.

Lets keep Lua weird :)