[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: special forms, take two (was Re: A lua version of "amb")
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 27 Feb 2012 08:38:16 +0200
On Mon, Feb 27, 2012 at 2:49 AM, Miles Bader <miles@gnu.org> wrote:
> In this case, the point seems to be reducing the size and visual impact
> of small lambdas, which suggests not using a keyword would be better.
Yes, but there was a surprising backlash against short lambda forms.
There is a great fear that Lua could become Perl, and degenerate into
line noise. (I appreciate that the functional style is not everyone's
cup of tea, however.)
I like a variant on the Metalua syntax: |x|(x+1). The parentheses
make the scope of the expression unambiguous, and the syntax gives a
clear meaning to something like |x,y|(x+y,x-y) as a function returning
two values. Plus, easy to do lexically by token-filters, macros and so
forth.
steve d.
- References:
- A lua version of "amb", Xavier Wang
- special forms, take two (was Re: A lua version of "amb"), Jay Carlson
- Re: special forms, take two (was Re: A lua version of "amb"), steve donovan
- Re: special forms, take two (was Re: A lua version of "amb"), Jay Carlson
- Re: special forms, take two (was Re: A lua version of "amb"), steve donovan
- Re: special forms, take two (was Re: A lua version of "amb"), HyperHacker
- Re: special forms, take two (was Re: A lua version of "amb"), Miles Bader