lua-users home
lua-l archive

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

On Thu, Jan 27, 2011 at 10:20 AM, Axel Kittenberger <> wrote:
> For your 'objects' you can make ipairs mean whatever you want it to.
> Sticking with the default meaning (e.g. for proxy tables) should be
> prefered coding style since the reader/maintainer familiar with Lua
> will expect it to work that way.

Yes, both the beauty and the pain of dynamic languages comes from
interfaces being 'underspecified'.

There is a mechanism, then we have to choose policy.

__next meaning overriding the meaning of next()?  It could go further
and modify pairs() behaviour as well, but that might have performance
implications (there's always that trade-off)

steve d.