lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Nov 24, 2010 at 17:18, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> For instance:
>
> initial_token = '\'
> separator = '. ('
> final_token = ')'
>
> e.g.: \x.(x+1)    \x,y.(x+y)    \.(3)

Indeed. I'm not fond of the original lambda notation in computer programs.

I know its historic value, but I think that he constrains of the
parser turn it into a bastardised form that departs a lot from the
original (for the uninformed, see [1]). The dot is superfluous here.
It doesn't make the expression more readable (except perhaps for the
case of the empty argument list). Another, more visible (@, $)[2]
token could be used instead of the backslash (although it is one of
the less semantically charged ones in programming languages, which
makes it a good candidate).

What would you think of having both
    `\` args `(` [explist] `)`
and
    `\` args `[` chunk `]`
?


-- Pierre-Yves

[1] http://en.wikipedia.org/wiki/Lambda_calculus
[2] I'm currently discovering Perl (not by choice), and I can
understand that these sigils give headache to some people...