lua-users home
lua-l archive

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


--- Peter Prade <prade@phenomic.net> wrote:
> another nice thing would be to make the separator optional (like for blocks
> of statements):
> t = {1 2 3}
> t = {
> 	1
> 	2;
> 	x=5,
> }
> 
> this would enable you to easily transform a list of global variable
> initializers into a table just by adding curly braces:
> 
> global_var1 = "a"
> global_var2 = 2; global_func = print;
> 
> -->
> 
> local my_vars = {
> global_var1 = "a"
> global_var2 = 2; global_func = print;
> }

That would be awesome, because it would open the doors for making variables default to local
(making Lua a better scripting language), without affecting Lua's ease of use as a configuration
language.  To change an existing config to support the "new Lua", you would simply add something
like:

myconfig = {
  -- original file contents here --
}

Cheers,
Eric


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com