[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Inline Functions
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 26 Dec 2002 20:31:35 -0200
>Regardless, one *should* be able to have:
> function(a) return a end (123)
This does not work because it requires 2 lookaheads. It could be made to work,
of course. However, instead of trying to cater for all possible combinations,
we decided that anything can be used for calling, but complex things must be
inside parentheses. So these work:
(function(a) return a end) (123)
(987)(123)
(the second one gives a runtime error, not a compilation error.)
We think this is a simple rule that makes it possible to write complex things
while not complicating too much the rest of the syntax.
--lhf