[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Begin/End Proposal
- From: Peter Cawley <lua@...>
- Date: Sat, 3 Oct 2009 11:53:29 +0100
On Sat, Oct 3, 2009 at 11:30 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> The OP said "anonymous, argument-less functions".
> Anyway, I don't see how "begin --> function ()" needs keeping track of nesting.
The proposal has two main components (IMO):
1) The transformation of "begin" to "function()" (though I'd argue
that a transformation to "function(...)" would be more useful (and
wouldn't break anything), as then argument(s) can be accessed if so
desired).
2) An extension of the parenthesis-less function call mechanic
currently applicable to string and table arguments, to make it also
work with functions arguments. Doing this with a token filter requires
knowledge of when to inject parenthesis.