220 4643 <87sj17anqh.fsf@euclid.axiomatics.org> article
Path: news.gmane.org!not-for-mail
From: Gabriel Dos Reis <gdr@axiomatics.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Changing lambda scope
Date: Mon, 27 May 2013 20:37:26 -0500
Organization: axiomatics.org
Lines: 59
Approved: news@gmane.org
Message-ID: <87sj17anqh.fsf@euclid.axiomatics.org>
References: <ae01f736-d3ac-48d6-981f-702b9ab2b3b3@isocpp.org>
	<CAFk2RUax65FEaDaeKCEdBig+bq4W4u_+39R3hsdBuyiOj-rpjA@mail.gmail.com>
	<90375ba5-8005-47da-9e84-eee151d0ba0a@isocpp.org>
	<CAFk2RUZzoT4HH8FYDJqVbj4dU+s9zUQRpYX9seprDSHDxF7U6w@mail.gmail.com>
	<CAOfiQqm2hNSOmxoSAxBSS0dL6fB=ZcbxHZDxhPD5Z_Q69hrghA@mail.gmail.com>
	<2e120ca5-740b-4301-8a32-8ac5035fa108@isocpp.org>
	<0df9d0d8-a752-4841-ba02-54780590f722@isocpp.org>
	<CAGsORuB9UByzMkk8PZC67ByrvxKFmud51jgEZxWq31TAy8Zf=g@mail.gmail.com>
	<87d2sd5k77.fsf@euclid.axiomatics.org>
	<c110a614-dc6c-4464-905c-7fba2d51c211@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1369705053 15952 80.91.229.3 (28 May 2013 01:37:33 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 28 May 2013 01:37:33 +0000 (UTC)
Cc: std-proposals@isocpp.org
To: Nicol Bolas <jmckesson@gmail.com>
Original-X-From: std-proposals+bncBCSYNQUB2UHRBWUUSCGQKGQEAG2DZBA@isocpp.org Tue May 28 03:37:34 2013
Return-path: <std-proposals+bncBCSYNQUB2UHRBWUUSCGQKGQEAG2DZBA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSYNQUB2UHRBWUUSCGQKGQEAG2DZBA@isocpp.org>)
	id 1Uh8qx-00031x-TB
	for gclcip-std-proposals@m.gmane.org; Tue, 28 May 2013 03:37:32 +0200
Original-Received: by mail-ie0-f200.google.com with SMTP id 10sf31144820ied.3
        for <gclcip-std-proposals@m.gmane.org>; Mon, 27 May 2013 18:37:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:from:to:cc:subject:in-reply-to:organization:references
         :sender:date:message-id:lines:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=gArLol/FenWTyReBMfAtXdyjOW9Qh50dyX86uA580tg=;
        b=D3hVCseRuBWJ4BlSvaph7YsIwb5IV7ZrTTk+ej1yGnPLiTYz/Z8yzEUPvVxaWCGJYg
         7WFIX1QijdYBtPJ0+UKUfTqeCDh12K4si+XKuZ1RYdNlE4Xdi+kcS1LPumV9GDTkndHk
         6RlS9BO9skuvEZ1XmWoSXvQRbfdbZvPYqSxShqc/u1H+ZQpa3WMMm/kdh8v7XfChlgDH
         cxzndk2r3A036r//AhXmsvDiYxi+f9ZzV8Web39EY3t1l/rtnX1mBSoIQUZf/rw5t2ep
         1PhyJiZaRSwhg9FghxiwFWkFmkmi7D1bFmUjzOEA4QO86uTuis/K+NCRIUVGqtqsp0Xs
         
X-Received: by 10.182.138.101 with SMTP id qp5mr1055582obb.16.1369705050844;
        Mon, 27 May 2013 18:37:30 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.115.202 with SMTP id jq10ls1225977obb.72.gmail; Mon, 27
 May 2013 18:37:27 -0700 (PDT)
X-Received: by 10.60.178.242 with SMTP id db18mr19155817oec.74.1369705047216;
        Mon, 27 May 2013 18:37:27 -0700 (PDT)
Original-Received: from mail.axiomatics.org ([2600:3c00::f03c:91ff:feae:e0e6])
        by mx.google.com with ESMTP id qo7si18341457obb.59.2013.05.27.18.37.27
        for <std-proposals@isocpp.org>;
        Mon, 27 May 2013 18:37:27 -0700 (PDT)
Received-SPF: neutral (google.com: 2600:3c00::f03c:91ff:feae:e0e6 is neither permitted nor denied by best guess record for domain of gdr@axiomatics.org) client-ip=2600:3c00::f03c:91ff:feae:e0e6;
Original-Received: by mail.axiomatics.org (Postfix, from userid 1000)
	id CB207EBB6; Mon, 27 May 2013 20:37:26 -0500 (CDT)
In-Reply-To: <c110a614-dc6c-4464-905c-7fba2d51c211@isocpp.org> (Nicol Bolas's
	message of "Mon, 27 May 2013 00:19:11 -0700 (PDT)")
Original-Sender: gdr@euclid.axiomatics.org
Original-Lines: 48
X-Original-Sender: gdr@axiomatics.org
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 2600:3c00::f03c:91ff:feae:e0e6 is neither permitted nor denied
 by best guess record for domain of gdr@axiomatics.org) smtp.mail=gdr@axiomatics.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4643
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4643>

Nicol Bolas <jmckesson@gmail.com> writes:

| On Sunday, May 26, 2013 5:40:28 PM UTC-7, Gabriel Dos Reis wrote:
| 
|     Zhihao Yuan <lic...@gmail.com> writes:
| 
|     | On Sun, May 26, 2013 at 7:17 PM, Nicol Bolas <jmck...@gmail.com> wrote:
|     | > A lambda is nothing special; it's just shorthand notation for a type
|     | > declared at that scope. We shouldn't have special-case language in the
|     | > standard that says "if the local type is a lambda type, blah blah".
|     |
|     | I don't agree.  Lambda is special, conceptually, as a language structure.
|     | It's described in terms of a class / class template does not mean its
|     | semantics has to be limited by class / class template.
| 
|     I tend to agree that a lambda expression is a fundamental language
|     construct (from semantics point of view), and it is unfortunate that we
|     somehow think of it in terms of local classes.  We shouldn't think of
|     lambdas in terms of implementation details.
| 
| 
| Whatever they may be "from semantics point of view", they are still just types.

I am afraid I do not understand by what you mean by that sentence.
Could you elaborate?

| The fact that there's nothing a lambda can do which you can't do yourself is a
| strength of C++ lambdas, not a weakness. 

Again, I am afraid I do not understand this statement.

| It allows you to swap a lambda for a
| regular class if the lambda gets too complex for the lambda syntax to work. The
| class version will have the exact same behavior as the lambda version, modulo
| extra features of the class.
| 
| We should not allow lambdas to do anything you couldn't do yourself. We don't
| want people overloading on lambdas. We don't want people writing huge, complex
| lambdas when a struct definition would be more appropriate, and having

I am afraid I do not see how you got from there to here.

| different functionality between lambdas and structs would encourage doing this.
| However much people may want lambdas to be some unique construct with its own
| special rules, C++ shouldn't allow that.
| 
| It's just a class with a operator() overload. We should not pretend that it's
| anything but that.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



.
