lua-users home
lua-l archive

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


On Thursday 30 December 2010 13:13:45 Mark Hamburg wrote:
> Having pushed for standard libraries, I do think that they should hold to a
>  few principles:
> 
> 1. They should be optional. You should be able to use Lua just like you can
>  today at the "primitive" level of tables, etc.. In fact, they could enable
>  Lua to get smaller by removing some functionality to optional additional
>  libraries. Small languages with large mandatory class libraries are not
>  simple or small even if the core language is simple.

I've used Lua only two weeks so what do I know, but I agree wholeheartedly 
with Mark. The reason I like Lua so much is that you can do almost anything 
with a very few features. Tables, with their "everything is a key value pair" 
philosophy, make this such an understandable language, and I wouldn't want to 
lose that or have to require something to get it.

There's been some discussion of #tab being wrong and maybe it should be fixed. 
I haven't run across the need yet. In C or Pascal you use the equivalent of 
#tab as an upper limit in a loop, but when you have pairs(), ipairs() and 
next() this isn't necessary in that context. And if it ever becomes necessary, 
the programmer can always add a table entry corresponding to the number of 
entries, or the number of a certain kind of entries. Only in an incredibly 
complex and versatile functionality would you need to know #tab on an 
arbitrary table.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt