[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ipairs deprecated?
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 12 Mar 2013 07:11:14 +0200
On Mon, Mar 11, 2013 at 9:30 PM, Petite Abeille
> No. No shark was jumped.
It came from a time when the Lua team were trying to simplify Lua
further. Having dropped function environments, and seeing that
ordinary tables could redefine #, it was felt that ipairs could always
be replaced with a plain loop. However, there's _so much_ code out
there that uses ipairs(), so it was kept, and tables may redefine its
meaning with the __ipairs metamethod.
Otherwise, the first thing that would have happened is people would
have started writing their own ipairs ;)