lua-users home
lua-l archive

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


Roberto Ierusalimschy <rieru@delirius.cs.uiuc.edu> writes:

> In my understanding, we all agreed that most parts of a good module
> system can be done in Lua itself.

I strongly urge that a module system be designed by considering user
needs and not its ease of implementation.  If a careful analysis of
user needs dictates a design that requires large changes to the current
code base, we should gladly accept this fact.  

For example, we might consider designs that result in a change to byte
code interpreter.  In particular, the instruction for fetching a
non-local variable might be changed so that it can access a variable
in a module using a fully qualified name as is done in Java.  As a
result, module name resolution could be handled in C code.

In summary, explore designs for module systems under the assumption
that both the language and its implementation can be changed.  Study the
engineering trade-offs later, when the user needs for a module system
have been clearly identified.  It's too early to talk about
implementation mechanisms.

John