lua-users home
lua-l archive

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


PA wrote:

Perhaps. But it's inconsistent and confusing.


If I thought so then I would be in your park. I find it not to be confusing at all, and only inconsistent in that it doesn't apply to non-tables - for the same reason that '12334abs'[4] doesn't apply to to non-tables. Is [] inconsistent and confusing? :) At some point the language makes decisions about where to specialize and to apply constructs differently.

Lua uses the global table when there is no '.' or ':'. I don't see it as much of a stretch to have Lua look in the global table when ':' (or even '.') is used with an object that isn't a table. Since 5.0 we've got the string and table routines in their own libraries, so that certainly makes it more complicated.

I'm gonna start a new thread with this topic. I just had an interesting (but probably bad) idea.

In my personal opinion, Lua core should work in terms of only one construct, namely the all encompassing table with it associated dot notation.


You mean you think Lua should get rid of numbers and strings and booleans and threads? :)

Plus, excess of sugar is bad for your health and make your teeth rot.
Those are just my opinions :)


Well, the dental community agrees with you, though there are probably some sugar farming organizations that might argue. :)

Perhaps we should add some chocolate (http://news.bbc.co.uk/1/hi/health/892591.stm)!

Doug

--
--__-__-____------_--_-_-_-___-___-____-_--_-___--____
Doug Rogers - ICI - V:703.893.2007x220 www.innocon.com
-_-_--_------____-_-_-___-_--___-_-___-_-_---_--_-__-_