[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] LuaJIT-2.0.0-beta1
- From: Mike Pall <mikelu-0911@...>
- Date: Sun, 1 Nov 2009 17:57:06 +0100
David Given wrote:
> > 4) table.maxn
> > 5) deprecated table.setn
> Again, these are Lua 5.0-isms that are now deprecated in Lua 5.1. Use
> #table instead.
That's true for table.setn.
But table.maxn is not deprecated. It's just a very slow and very
stupid function that anyone could write themselves quickly (for the
few cases where you *really* need it). It should never have found
its way into the Lua codebase, but my veto was ignored back then.
I also predicted it would be misused. Nowadays, newbies amongst
the WoW modders use table.maxn all over the place, where they
really should use #t. Drats.