lua-users home
lua-l archive

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


On Fri 07 Jun, Björn De Meyer wrote:
> 
> Toyotomi wrote:
> > 
> > I thought you were talking about compiled libraries, so & dll, etc. I often
> > think people are talking about the C side instead of the Lua side.
> > 
> > This sounds like a job for "require", & library is a bad term to use here.
> > If not "require", then I'm sure I saw this sort of thing somewhere...
> 
> Ah yes. That we certainly do need. A standardized require("foo.lua"); 
> function. Ideally it should look for foo.lua in certain predefined 
> and hard-coded places, in the pathlist in a LUA_INCLUDE environment
> settings, and in the current directory. If it can find foo.lua
> anywhere on that path, then it is executed. Of course, there should
> also be some way to limit the places where require() looks, for security 
> reasons. Is there such a thing in the works for Lua 5?

Anything involving the filing system is platform dependent and
so should NOT be standardized in Lua. There is nothing to stop
users of a particular platform getting together to make their
own standard library extensions.
-- 
Gavin Wraith (gavin@wraith.u-net.com)
Home page: http://www.wraith.u-net.com/