lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
On a related note, may I assume from what you said that now the
standard contract for a module can be (incompletely) summarized as
in the following lines?

1. when loaded and called, a module's chunk should return a table
containing its "exported" symbols
2. a module should not create any global
3. ? any more items in the contract?

Roughly it is only rule 1. (We should not say what it should not do: a
module should not create any global; it also should not erase your hard
disk; it should not send emails to your friends; etc.)
Fair enough! My bad :-)

But remember that this is a standard contract; modules are
free to use different contracts if needed (see related message).


(BTW should this contract be the same for both Lua and C modules?)

Yes.
Ok. Good to know.

-- Roberto


Thank you very much again!
-- Lorenzo