[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pairs(t, skey) and ipairs(t, skey)
- From: Marc Lepage <mlepage@...>
- Date: Wed, 2 Oct 2013 15:24:03 -0400
Additionally, if your function expects a sequence and your user knows it will operate on a sequence (e.g. for i = 1, #t), that doesn't necessarily stop them from putting other "metadata" into t (like t.something and t.somethingelse) that they know will not interfere with your function's processing of t. I do this sometimes myself: treat tables as sequences from the perspective of one set of functions, but another part of the program can still augment them with their own metadata, if they wish.
- References:
- Re: pairs(t, skey) and ipairs(t, skey), Dirk Laurie
- Re: pairs(t, skey) and ipairs(t, skey), Paul K
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo