[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: Axel Kittenberger <axkibe@...>
- Date: Thu, 25 Nov 2010 18:20:28 +0100
I'm against do for lamdas, since it is actually the very contrary.
Nothing is done / executed here, but a code is constructed to be done
later.
2010/11/25 Pierre-Yves Gérardy <pygy79@gmail.com>:
> On Thu, Nov 25, 2010 at 13:02, Rob Kendrick <rjek@rjek.com> wrote:
>> do [ x, y ] return x * y end
>
> Yep, but with an optional short return statement. It is still much
> more readable than the current syntax. I'd like to have a syntax
> that's clearly different from function invocation.
>
> function acc()
> local up = 0
> return do [x] up = up+x; => up end
> end
>
> "return do" is weird, though.
>
> -- Pierre-Yves
>
>
- 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, Paul Hudson
- Re: Lightweight syntax: a dissident view, Rob Kendrick
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy