[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Sat, 27 Nov 2010 10:15:45 +0100
On Saturday, November 27, 2010, Paul Hudson <phudson@pobox.com> wrote:
>>This branch of the discussion was about short forms for returning expressions.
>
> It would be a pity (IMO) if it didn't handle statements too. E.g. foreach is a common higher order function that is just for its side-effects. Of course, the function could always return a value that's ignored.
The foreach case is properly covered by the generic for loop. If you
want side effects from an expresision, you'd have to define a
temporary function and call it, or use the long litteral.
--Pierre-Yves
--
-- 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, 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
- Re: Lightweight syntax: a dissident view, steve donovan
- Re: Lightweight syntax: a dissident view, phlnc8
- Re: Lightweight syntax: a dissident view, Doug Lua
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Doug Lua
- Re: Lightweight syntax: a dissident view, Paul Hudson