[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: David Kastrup <dak@...>
- Date: Thu, 25 Nov 2010 23:13:45 +0100
Axel Kittenberger <axkibe@gmail.com> writes:
> Why everything so complicated?
>
> How about simply this
>
> lambda(x) x == 2
>
> no end, no return, no statements before return, if you want statements
> use function() syntax. The lambda goes until end of statement, if you
> want to write more in the line use a ';' to separate it like other
> statements. A lambda function is also by itself terminated by a ','.
> If you need something like 'if', use something like 'select' when in
> function-coding-style-mode.
>
> return lambda() x, y ==is==> return function() return x end, y
>
> if you want to return multiple value, use brackets:
>
> return lambda()(x, y) ==is==> return function() return x, y end
I don't like shift/reduce conflicts.
--
David Kastrup
- References:
- Re: Re: Re: Lightweight syntax: a dissident view, Gunnar Zötl
- Re: Re: Re: Lightweight syntax: a dissident view, Luis Carvalho
- Re: Re: Re: Lightweight syntax: a dissident view, Axel Kittenberger
- Re: Re: Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Re: Re: Lightweight syntax: a dissident view, Roberto Ierusalimschy
- Re: Re: Re: Lightweight syntax: a dissident view, Mateusz Czaplinski
- Re: Re: Re: Lightweight syntax: a dissident view, Axel Kittenberger
- Re: Lightweight syntax: a dissident view, Philippe Lhoste
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Mark Hamburg
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Axel Kittenberger