lua-users home
lua-l archive

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


Hi list,

I'm currently finalizing the text of my article for the Lua Gems book,
and I've run into a naming problem.

The article describes how to modify the module loading mechanisms. The
Lua 5.1 module architecture use two type of functions to load a
module. First there is an array of functions that can be used to find
modules and partially load them. These functions, let's call them type
A, are in the table package.loaders. Then each Lua module must have an
initialization function that completes the module loading (for Lua
modules it's the main module chunk, for binary modules it's the
luaopen_xxx function). Let's call these initialization functions type
B.

Every module writer creates type B functions. My article explains how
to create new type A functions. It also explains how type A and type B
functions interact.

My problem is that the manual is only naming type B functions, it
gives them the name "loader" (see for example the manual page of the
'require' function [1]). In my initial gem text, I decided to go
against the manual, and call type A functions 'loaders' and type B
functions 'entry points'.

Now I'd like if possible respect the manual nomenclature. So assuming
the type B functions are module 'loaders', what would be a good name
for type A functions ? That's an open call for suggestions. Any
suggestion would help. Also if you think that 'loader' is better
suited for type A functions, please tell us (and eventually submit a
name for type B if you don't like 'entry point'), the official manual
could also be changed in that way.

Doub.


[1] http://www.lua.org/manual/5.1/manual.html#pdf-require