[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: stdlua.lua
- From: erik@... (Erik Hougaard)
- Date: Thu, 27 Sep 2001 15:00:44 +0200
----- Original Message -----
> Nevertheless, I suggest some other name be chosen to avoid confusion with
the
> "standard libraries" that come with Lua, that is liblualib.a in
Unix-speak.
This should be the easies part, and will properly prove to be the hardest
:-)
Suggestions:
stdlua
sfl
stdlib
... Short and simple, thats the important parts.
> I suggest a more flexible scheme: in stdlua.lua (or whatever the name is),
> test whether a table called "stdlua" exists. If it does, then stdlua.lua
should
> define only those functions whose name appear in the table. In this way,
users
> can choose the functions they need.
This would work also, what I belive is important is the single line include
thing.. So if you just need some utility function just
dofile("thefinalname.lua") and you have all functions. If you want to
control what functions you get (power-users) you can choose to do so.
I think its very important to keep it simple. People should be able to use
it with the (wrong) knowlegde they have from other languages.. Example:
dofile("stdlua.lua")
Jack = stdlua.clone(William)
But if a poweruser wants to reduce exported functions he could do:
stdlua = {clone=1}
dofile("stdlua.lua")
Jack = stdlua.clone(William)
/erik