[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Newbie questions regarding luasocket, tables
- From: Sam Roberts <sroberts@...>
- Date: Tue, 8 May 2007 11:05:06 -0700
On Tue, May 08, 2007 at 02:36:00PM -0300, Roberto Ierusalimschy wrote:
> > Wouldn't it be easy, and very low-overhead, to increment and decrement a
> > count for every add/remove? My countpairs() is O(n) :-(
...
> (Usually, most single needs have a simple, low-overhead, and quite
> efficient way to be implemented directly in Lua. But if we add each one
> of them to the language, the final result will be neither simple nor
> efficient.)
I understand that as a general principal.
In this case, I think the argument for having #t return the real table
size isn't that it adds a feature, but that it removes an annoying
special case, leading to a more regular and predictable language.
Thanks,
Sam
- References:
- Newbie questions regarding luasocket, tables, mpb
- Re: Newbie questions regarding luasocket, tables, Shmuel Zeigerman
- Re: Newbie questions regarding luasocket, tables, Luiz Henrique de Figueiredo
- Re: Newbie questions regarding luasocket, tables, Sam Roberts
- Re: Newbie questions regarding luasocket, tables, Roberto Ierusalimschy