lua-users home
lua-l archive

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


Jean-Claude Wippler wrote:
> 
> Maybe it is preferable to make "dofile" also mark the file as loaded?

Uff.  Better not!  Sometimes you want to load files multiple times.

> This has the benefit that a main script called "m", calling three
> other scripts "a", "b", and "c", can then be compiled as follows:
>   % luac -o m.out a b c m
> 
> If "m" contains:
>   require "a"; require "b"; require "c"
>   <do something useful>
> then "lua m" and "lua m.out" would do the same thing.

Making this work requires more magic...

> Another question: why was "require" coded in C, and not in Lua?

You have a bootstrapping problem :-)

	require "require"  ???

Ciao, ET.