[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 29 Nov 2010 09:52:50 +0200
On Mon, Nov 29, 2010 at 9:27 AM, Juris Kalnins <juris@mt.lv> wrote:
> $ - x --> return ... - x
Maybe I haven't had enough tea yet, but that scared me until I
realized you were comparing syntaxes ;) Definitely don't like $, that
feels far too much like Perl [1].
But 'return expr-referencing-varargs' _is_ cool, _if_
'expression-context' is unambiguous.
Gets awkward for functions of more than one variable, of course, but
short-forms have to be limited to work well.
An underscore _ reads better than ... here, and there has been
suggestions that _1, _2, etc acquire special meaning, a la Boost
lambda:
res = fun(return _1+_2)
steve d.
[1] In the Awk FAQ, the answer to 'Why not just use Perl?' is (a) Awk
is somewhat smaller and (b) you don't have to use $ for variables ;)
- 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, Erik Lindroos
- Re: Lightweight syntax: a dissident view, phlnc8
- Re: Lightweight syntax: a dissident view, Mark Hamburg
- Re: Lightweight syntax: a dissident view, Juris Kalnins