emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Clojure-like syntactic sugar for an anonymous function liter


From: Daniel Colascione
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Thu, 22 Jan 2015 01:45:43 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 01/22/2015 01:35 AM, René Kyllingstad wrote:
> On Thu, Jan 22, 2015 at 10:17 AM, David Kastrup <address@hidden> wrote:
>> That does not mean that I am convinced we want or need short-lambda.
> 
> Both C++ and Java have "recently" added a succinct syntax for their 
> equivalents.

They have, although Boost.Lambda is arguable even terser than what ended
up in the standard.  What makes the C++ and Java improvements different
is that the alternatives available in the old dialects of C++ and Java
were _far_ more verbose than the new syntax, so the relative gain was
larger than we'd see with the syntax proposed in this thread.  lambda is
terse enough already that we don't need a new, even terser syntax.

A better comparison is ES6 JavaScript's new short function syntax, which
replaces something like this:

  function(arg) { return foo(arg); }

with

  arg => foo(arg)

That's still a much bigger relative improvement than we'd get from
compressing the lambda symbol down to nothing.  ES6 arrows are also
this-capturing, which is a much-needed improvement in that language.  We
have no such problem.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]