[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ... efficiency (was Re: class implementation)
- From: Javier Guerra <javier@...>
- Date: Wed, 5 Apr 2006 14:23:08 -0500
On Wednesday 05 April 2006 2:19 pm, Diego Nehab wrote:
> While we are at it, anyone thought about having ... as an "l-value"?
>
> function capture(s, pat)
> local i, j, ... = string.find(s, pat)
> return ...
> end
i like that!
of course, you could always do:
function skip2 (_, _, ...)
return ...
end
function capture(s, pat)
return skip2 (string.find(s, pat))
end
but gets ugly for many situations
--
Javier
Attachment:
pgpTaMeBOfGA_.pgp
Description: PGP signature