[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Recursive local functions
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 4 Jan 2001 14:19:56 -0200 (EDT)
>What I'd love to see, is the ability to get a ref to the 'current'
>function, perhaps as an implicit variable, a bit like 'this' in java and
>C++.
>
>So that I could recurse by calling:
> currentfunc()
>rather than messing about with tables etc.
Come to think of it, this already exists!
Write "getinfo(1).func" inline or define
function currentfunc()
return getinfo(2).func
end
Yeah, metamechanisms instead of language features!
(Even I sometimes get suprised by how neat Lua is, if I say so myself...)
--lhf