lua-users home
lua-l archive

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


On Sat, Jan 9, 2010 at 6:27 PM, David Manura <dm.lua@math2.org> wrote:
> where "::" is basically like a "function()" but allows omitting
> parenthesis in the call.

Such a bit of sugar would also be useful with pcall.

Actually, there's no reason to use rawget/rawset, instead just:

   function s.__newindex(t,i,val) t.store[i] = val end

and so forth. Then t.store could be userdata.

Now, it would be cool if table.concat was intelligent enough to
understand such proxy arrays (i.e. use the overloadable ipairs, and
use tostring where applicable) without much performance cost.

steve d.