[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Second class nil? Strong and weak nils in tables?
- From: Miles Bader <miles@...>
- Date: Sat, 27 Oct 2007 23:18:24 +0900
Duck <duck@roaming.ath.cx> writes:
> So, code which might gracefully and efficiently use {...} must fall back
> ungracefully and less inefficiently (say the detractors) on select(), or
> table.maxn(), to deal correctly with varargs.
Can you given an example where the "fall backs" are less graceful or
less efficient? I'd think using "select()" would be _more_ efficient
(since it can avoid creating the table).
Anyway, code like:
local t = {...}
for k = 1, #t do
local v = t[k]
do_something (k, v)
end
seems clear enough...
Thanks,
-Miles
--
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. -- Jerry Garcia