[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] LTN 7 - Modules & Packages
- From: "Nick Trout" <nick@...>
- Date: Wed, 6 Jun 2001 10:33:32 +0100
>>From: Samson, Lyndon [IT]
I wonder how easy it would be to introduce namespaces/packages?
Could the dofile command be expanded to dofile(filename, table) and the
table passed used as the global table for executing the file?
eg.
String = {}
dofile("stringlib.lua",String)
x = String.strlen("a string")
Could a "using" keyword be added to jump into a table scope?
eg.
using String do
x = strlen("another string")
end
I assume the above would check any local and "used" scopes before checking
globals?
N