caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Eijiro Sumii" <eijiro.sumii@gmail.com>
To: "Caml List" <caml-list@inria.fr>
Cc: "Eijiro Sumii" <sumii@ecei.tohoku.ac.jp>
Subject: Stroustrup et al. propose to introduce "lambda closures" in C++
Date: Fri, 17 Mar 2006 19:07:32 +0900	[thread overview]
Message-ID: <a4d0794e0603170207x2c584885k6b928032e4929d40@mail.gmail.com> (raw)

Hi,

A friend of mine informed me of this report

    Lambda expressions and closures for C++
    Jeremiah Willcock, Jaakko Jarvi, Doug Gregor, Bjarne Stroustrup,
Andrew Lumsdaine
    2006-02-26
    http://public.research.att.com/~bs/N1968-lambda-expressions.pdf

and I thought you might be interested.  (I searched a little and
didn't find any discussion on this report in this list.)

A few highlights:

----------------------------------------------------------------------

    We propose to extend the C++ language with lambda expressions, and
define the semantics of these unnamed local functions via translation
to closures: function objects implemented using local classes.

...

    void f() {
      int sum = 0;
      for each(a.begin(), a.end(),
        <>(int x) -> int extern(sum) {return sum += x;});
    }

...

    2.1 Omitting the return type
    The return type of a lambda expression can be omitted if the body
of the lambda function contains at most one return statement.

----------------------------------------------------------------------

Enjoy:-),

        Eijiro


                 reply	other threads:[~2006-03-17 10:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4d0794e0603170207x2c584885k6b928032e4929d40@mail.gmail.com \
    --to=eijiro.sumii@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=sumii@ecei.tohoku.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).