lua-users home
lua-l archive

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

> Currently loops in the __index lookup are detected by restricting the
> lookup to a depth of 2000.
> This can be removed by detecting loops instead of using a depth.
> Using two iterators traversing the __index lookup chain. Therby one is
> faster (in this case twice) as the other.
> In case there is a loop the faster one will at some point catch up to the
> slower one. If this happens a loop was detected and an error can be raised.

Would you mind explaining this idea more clearly?

-- Roberto