[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible Lua enhancements (mostly for private data)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 19 Dec 2008 16:25:18 -0200
> 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;
> 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.
About (2), it may be worth some way to redefine 'next' (or even to make
it invalid for tables with a __pairs method).