[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: adventures with iterators
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 3 Dec 2012 21:34:52 +0200
2012/12/3 Sven Olsen <sven2718@gmail.com>:
> xpairs is a wonderfully clever piece of code. Though the more
> I think about it, the more nervous it makes me. Even in cases
> without __newindex or __index metamethods, errors have
> a chance of leaving the table in an awkward state. Steve's
> explicit proxy is safer, if less convenient.
To be honest, I don't use xpairs myself. The challenge of writing
it was the whole reward.
I try to rethink my problem so that one of the standard data
structures (stack, queue, deque, heap, ...) is applicable. Those
are well understood.