220 29856 <CACGiwhHpOT+Z-gM7ypjxTVvBA6=L0R-j1DFx6PsQdVWA1Rg=oQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "D. B." <db0451@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Default constructor for lambdas
Date: Fri, 16 Dec 2016 23:15:13 +0000
Lines: 61
Approved: news@gmane.org
Message-ID: <CACGiwhHpOT+Z-gM7ypjxTVvBA6=L0R-j1DFx6PsQdVWA1Rg=oQ@mail.gmail.com>
References: <13497310-30de-4542-9ba4-fb1fbd730cb6@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114ccb68fe113a0543cebdf9
X-Trace: blaine.gmane.org 1481930118 20309 195.159.176.226 (16 Dec 2016 23:15:18 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 16 Dec 2016 23:15:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCWNZ4ECS4GBBAXL2HBAKGQEXQEK3GI@isocpp.org Sat Dec 17 00:15:11 2016
Return-path: <std-proposals+bncBCWNZ4ECS4GBBAXL2HBAKGQEXQEK3GI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCWNZ4ECS4GBBAXL2HBAKGQEXQEK3GI@isocpp.org>)
	id 1cI1iY-0003ln-LT
	for gclcip-std-proposals@m.gmane.org; Sat, 17 Dec 2016 00:15:10 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id b14sf10151429lfg.6
        for <gclcip-std-proposals@m.gmane.org>; Fri, 16 Dec 2016 15:15:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=woAEli+DHVz/JWNIr02IIOLBvEsCgcCM3etTIqs86ic=;
        b=zd/9n0N3DCybNdN1PXlYMtVe0/BASUM+dM1pG4ClUwLxv/GPGfvlwj4UwjR7f/AsFl
         4E5G2sOh9ZAu5DDEtiEDCeRAzrSnZqByF5iXZeXUqWtvjN7aNRG5RZV9xRYlunXi8Gro
         N2dodHwIw4j37UOBIRaKw1BQynwMDgMxDSt+CngS5ygm/gfDJWeSahQPOvGOrUPRsMy6
         yPwmu7Ap/kzeOP3n9Ken2bYxkV6YnaADmcaiLBRV1kBV6DjB4Eh3uS9F7MA/Pkx87fDY
         ZwhY7SICM8QdQVCY9SBM/jPHnFULKg/Nty5eMORbCxVZQizs8P251pWP7ZnCIlla0iL/
         vT0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=woAEli+DHVz/JWNIr02IIOLBvEsCgcCM3etTIqs86ic=;
        b=AJapUfgCAUcjgyZj0H/0kmXMsGKJ2oxHPAR/rB+V+HvSoYU7CuIwAPYyCC2nKn2Hnb
         /2+jH9v7h2H+F73t1jXIA8Ckl1EyfnC+WvIV5Xb/BfEmx1As7K7euMK8h0AQKlOe8rH8
         CjFIM+ShJJ23LCf4QCmlKY9vM0ot4+pq31nfLTekhrVvrHcqse18rPrr5rFiBGJnV/ox
         zuDoT5XeNHN6jl2MUjySRCDw5nX7AZSrXo3EltdJhTa0x4TX6wMS6Bm+1qxJNuvvfQN3
         +v5HGDKXU4+5OhMeKUUy8uXU4bNBzwHsVKgQ4OYjV5eVrrTHh2fKNPxpA28oYrHDPD/X
         AFkQ==
X-Gm-Message-State: AKaTC03tKnyHqmm+/E2gT7xtFGjvvkpAg1k3jfAOr3SqCwb7cqzLFyJsY/1NubVp/7sU7Q==
X-Received: by 10.25.202.26 with SMTP id a26mr435926lfg.26.1481930114965;
        Fri, 16 Dec 2016 15:15:14 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.203.73 with SMTP id b70ls519299wmg.3.canary-gmail; Fri, 16
 Dec 2016 15:15:13 -0800 (PST)
X-Received: by 10.28.209.7 with SMTP id i7mr5319910wmg.62.1481930113769;
        Fri, 16 Dec 2016 15:15:13 -0800 (PST)
Original-Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com. [2a00:1450:400c:c09::235])
        by mx.google.com with ESMTPS id l128si5636291wml.79.2016.12.16.15.15.13
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 16 Dec 2016 15:15:13 -0800 (PST)
Received-SPF: pass (google.com: domain of db0451@gmail.com designates 2a00:1450:400c:c09::235 as permitted sender) client-ip=2a00:1450:400c:c09::235;
Original-Received: by mail-wm0-x235.google.com with SMTP id a197so47867484wmd.0
        for <std-proposals@isocpp.org>; Fri, 16 Dec 2016 15:15:13 -0800 (PST)
X-Received: by 10.28.168.137 with SMTP id r131mr4904351wme.16.1481930113420;
 Fri, 16 Dec 2016 15:15:13 -0800 (PST)
Original-Received: by 10.28.144.66 with HTTP; Fri, 16 Dec 2016 15:15:13 -0800 (PST)
In-Reply-To: <13497310-30de-4542-9ba4-fb1fbd730cb6@isocpp.org>
X-Original-Sender: db0451@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of db0451@gmail.com
 designates 2a00:1450:400c:c09::235 as permitted sender) smtp.mailfrom=db0451@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:29856
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29856>

--001a114ccb68fe113a0543cebdf9
Content-Type: text/plain; charset=UTF-8

My uninformed guess is that it's because lambdas are primarily intended to
be called and passed around as opaque entities, and the fact they have
types is a kind of unavoidable baggage, rather than a design goal or
something to exploit. But I'm quite likely to be wrong :)

Could you elaborate on where an ability to construct another instance of
the templated type would be useful? As written, I can't see why you
wouldn't just stash it as a member in the ctor and call it again later. it
seems wasteful, constructing a lambda initially, only to discard it and
rebuild on each execute(); the one in the ctor is merely a surrogate for
type deduction. If the type had mutable or static members, that could cause
different behaviour, but then why would you pass such a type into the above
pattern? There must be motivations this doesn't illuminate (or maybe it's
just too late in the day for me to be thinking about things like this!)

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHpOT%2BZ-gM7ypjxTVvBA6%3DL0R-j1DFx6PsQdVWA1Rg%3DoQ%40mail.gmail.com.

--001a114ccb68fe113a0543cebdf9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>My uninformed guess is that it&#39;s because lam=
bdas are primarily intended to be called and passed around as opaque entiti=
es, and the fact they have types is a kind of unavoidable baggage, rather t=
han a design goal or something to exploit. But I&#39;m quite likely to be w=
rong :)<br><br></div>Could you elaborate on where an ability to construct a=
nother instance of the templated type would be useful? As written, I can&#3=
9;t see why you wouldn&#39;t just stash it as a member in the ctor and call=
 it again later. it seems wasteful, constructing a lambda initially, only t=
o discard it and rebuild on each execute(); the one in the ctor is merely a=
 surrogate for type deduction. If the type had mutable or static members, t=
hat could cause different behaviour, but then why would you pass such a typ=
e into the above pattern? There must be motivations this doesn&#39;t illumi=
nate (or maybe it&#39;s just too late in the day for me to be thinking abou=
t things like this!)<br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhHpOT%2BZ-gM7ypjxTVvBA6%3DL0R-j=
1DFx6PsQdVWA1Rg%3DoQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHpOT=
%2BZ-gM7ypjxTVvBA6%3DL0R-j1DFx6PsQdVWA1Rg%3DoQ%40mail.gmail.com</a>.<br />

--001a114ccb68fe113a0543cebdf9--

.
