lua-users home
lua-l archive

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


This, along with the move from `setfenv()` to `_ENV` also shows that
when the language evolves, it does in the right direction (i.e. unifying
concepts that don't need to be singled out), which is one of the things
I most appreciate. Meanwhile, Ruby just introduced a third (I almost
want to say fourth) type of "thread", and JavaScript introduced special
syntax for classes not too long ago with ES6.

This is probably one of the things that gets misunderstood though:
people often ask for "features" that really just end up being special
syntax for something that's already possible¹.

The move to lua files returning the "module" so they exist purely as
locals where they're required is exemplary of one of the biggest
differences in design philosophy between Lua and Ruby (the other
language I (am forced to) use), where you require something and it just
dumps all of its constants and classes into your global environment
(usually they are at least namespaced into a single module, but still, ugh).

On 16/01/2021 10:36, Petite Abeille wrote:
>> On Jan 16, 2021, at 10:31, Timm S. Mueller <tmueller@schulze-mueller.de> wrote:
>>
>> I'm not always following the mailing list closely. What was "the"
>> module debacle?
> Bah... it's long gone. Water under the bridge.
>
> See "The old way of creating modules":
> http://lua-users.org/wiki/ModulesTutorial

PS:

¹ I still get downvotes on that StackOverflow answer explaining why Lua
doesn't have and doesn't need a `continue` statement and, while I can't
be sure of course, I do believe that most of those downvotes are from
python developers 😏


Attachment: signature.asc
Description: OpenPGP digital signature