lua-users home
lua-l archive

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


> What has struck me about that code is that 
> really all you need are two things:
>
> 1. Keys that can't be synthesized -- i.e., something other than strings; 
> and
> 2. A way to keep those keys from being discovered via iteration

We already have (1), as you already pointed out. What we do not have is
the syntactic sugar to use them. But I am not sure the explicit call
"obj[key](obj, ...)" (without sugar) is that bad for such special usage.
Is it?

About (2), it may be worth some way to redefine 'next' (or even to make
it invalid for tables with a __pairs method).

-- Roberto