New paper: N3560, Proposal for Assorted Extensions to Lambda Expressions -- Faisal Vali et al.

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3560

Date: 2013-03-17

Proposal for Assorted Extensions to Lambda Expressions

by Faisal Vali, Herb Sutter, Dave Abrahams

Excerpt:

We propose extensions to lambda expressions motivated by the general view that lambda expressions should allow for a concise and complete description of a callable unit of computation. In addition to containing those features from document N3418: Proposal for Generic (Polymorphic) Lambda Expressions that received against votes in Portland (2012), it also contains other small extensions to lambdas. We also present our experience implementing some of the features using Clang.

... The aim of this paper is to propose various extensions to lambda expressions (generic and non-generic) to simplify and enhance their use. This proposal builds on N3559 (which defines a generic lambda). We assume the reader is familiar with C++11 lambdas and the content of N3559.

It is important to note that not all the authors of this paper are in favor of each and every one of these proposed features and the purpose of this paper is to seek guidance from the EWG regarding which features are worth pursuing further.

Add a Comment

Comments are closed.

Comments (6)

0 0

Michael Bruck said on Mar 18, 2013 12:01 PM:

Is there any reason why the operator in 2.2 is not constexpr?
1 0

mmocny said on Mar 18, 2013 12:43 PM:

Section 2.5 (Lambda Syntax for Functions vs Named Lambdas vs use of auto in function parameters) mentions "discussion on the reflector [c++std-ext-14220 - 14232]" and the paper later references "[Spicer-ext-14260] J Spicer. Post on the EWG Reflector"

But I cannot for the life of me find this online. What is this referring to? I would love to read it, thanks.
0 0

Faisal Vali said on Mar 18, 2013 01:56 PM:

@mmocny You won't be able to access the reflectors - they are open only to committee members - i wish i had had time to summarize the arguments in the current paper (I admit it is poor form - but i was really running out of time). I'll try and include some of the pros and cons here within the week.
sorry about that.
Thanks for taking the time to read the paper and respond.
0 0

Faisal Vali said on Mar 18, 2013 01:57 PM:

@MichaelBruck Which operator are you referring to?
0 0

Michael Bruck said on Mar 18, 2013 02:46 PM:

@Faisal Vali
Sorry, had both your lambda papers open and commented on the wrong one. The comment was referring to
http://isocpp.org/blog/2013/03/n3559-proposal-for-generic-polymorphic-lambda-expressions-rev.-2

and the proposed conversion "operator fptr_t<R, A, B>() const" in section 2.2
0 0

mmocny said on Mar 19, 2013 07:39 AM:

@Faisal Vali
Thanks for the reply. This is all very interesting stuff. In particular, I'm curious to know how similar to/influenced by your reference in 2.5 is to "having it all" (aka, pythy syntax, http://cpp-next.com/archive/2011/11/having-it-all-pythy-syntax/).