[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Look at the Design of Lua
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 31 Oct 2018 21:53:50 +0200
Op Wo., 31 Okt. 2018 om 16:38 het Hisham <h@hisham.hm> geskryf:
> I'm slightly annoyed that basic Lua module examples often display
> messy naming practices. Here, the module is written named as "M",
> stored in a file called "mymodule" and required into a variable "vec".
> I understand that this is to didactically showcase that the names are
> not _required_ to be the same, but it promotes those practices (which
> are sadly common among Lua programmers, probably due to top-down
> examples like this) and IMO it makes the module system look even more
> jerry-rigged.
I have no problem with what Lua programmers do. In fact local renaming
is to my mind good practice.
local json = require"org.conman.parsers.json"
Nothing wrong with that.
I do have a problem with what some Lua package writers do. The actual
name to be required is something Unixly cryptic like lfs or lom. but
the package name is longer (luafilesystem) and may even have nothing
to do with the module name (luaexpat). BTW why must the package name
start with or contain the tautological "lua"?