220 11896 <D0BD1D02-1ADB-4854-BD2F-8E889C20B573@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N4078: Rvalue reference overloads for value()
 method returns object by value
Date: Sat, 12 Jul 2014 23:23:36 +0800
Lines: 80
Approved: news@gmane.org
Message-ID: <D0BD1D02-1ADB-4854-BD2F-8E889C20B573@gmail.com>
References: <b538efba-faf4-4ffc-a553-302b9d2ba2c0@isocpp.org>
 <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com>
 <4DA018C3-2327-4F55-B7F8-7988EC7B789A@gmail.com> <1a858a77-310b-4591-aaf5-960c40d9f5fc@isocpp.org>
 <66AF41C1-CB37-4311-98EA-D47DBC6068DC@gmail.com> <66c38b61-7a95-4ace-b34f-2346bb334fb9@isocpp.org>
 <F1CBA358-0AD8-4ADD-99DA-6D00FCFE150F@gmail.com> <CAFk2RUZENmaMW5NwBaiF6byfhgRyPUsSmuyVjnRDhbjcfaTtQA@mail.gmail.com>
 <CC03CC1C-8487-40C8-97DF-2CA7661DAD55@gmail.com> <CAFk2RUa7-WTcL=XFYO8KMyU4rdpjDEfFM6n6SkUZ=SW_U7s5XQ@mail.gmail.com>
 <EF930317-EB97-402E-A3A0-CC46E7E2D998@gmail.com> <CAFk2RUZigiwLwFpfVXuFS8cqy38hPG3OGhGUi+iNwSYuYvyAyQ@mail.gmail.com>
 <A46ADDB4-C9B0-4163-81BE-900CD879D8C8@gmail.com> <CAFk2RUZ-DqEcMeehjH8KedYgErxKMq4O9kmeN4FZzjkXMYSsiw@mail.gmail.com>
 <6F4B3C72-9962-48DC-8527-0C89EA1B9710@gmail.com> <CAFk2RUb5xynaoQx-j4cQuXC8t-0GGc9-CZyRA2V=j6cfuNQV=g@mail.gmail.com>
 <35873CE5-ED8C-4C03-A6A1-E4132DECD91F@gmail.com> <CAFk2RUYRJSNcXykj9oPd=3EehSozf7PcX8ACM_hrqhK+Ur2V8A@mail.gmail.com>
 <335948E6-8140-4673-B958-930356A52070@gmail.com> <CAFk2RUYf+tpBvxiK00O=FncB01BWe6+SXiYBN7fixd4mhm+Z-w@mail.gmail.com>
 <76ACA175-5A44-4BE8-B49F-BAC6DA65E6B1@gmail.com> <CAFk2RUah5k9zy_mQqeNN9mec0PYkmKDZp7LVXm64dTeSLaw6nQ@mail.gmail.com>
 <4D3852AD-1AEB-44BA-941C-D645BAD19405@gmail.com> <6a4b6425-1167-40c1-acd8-3945c8cd4c74@isocpp.org>
 <13DD0D7A-A146-4667-9F30-6FB3739CDBE0@gmail.com> <CADGW59=9uFv-fXRVuBCE+3fdycqTzaqCJnuVmmaT6mOF=1=-MA@mail.gmail.com>
 <E9F36B2C-A142-4B6C-ADFD-57D0E11F2C5B@gmail.com> <CAOenAXiBW+BiUkPWdGQHS9fkyEVWJg343NXH9kRSn9owk6FmgQ@mail.gmail.com>
 <DABFDEB7-ADF9-40EC-B4DB-672205A99FEB@gmail.com> <CAFk2RUa-kPWGy29siK4dUu6jbydfwbUeuzCpYOi+b9xc4-msSg@mail.gmail.com>
 <C3BA0F43-683E-4FFE-B04C-9015EB9C7CB0@gmail.com> <CAFk2RUYzt26HjKhYCZtJ4BMrjLzu9MQvZ0ynuaULWTYbE6MBAA@mail.gmail.com>
 <6B925FF7-2940-44C7-BF1D-13209A703BA2@gmail.com> <CAA7U3HOtwZ+9M1E2GUZjmT4J6onk3EdZSnskd-1OaKHv+-wJ7g@mail.gmail.com>
 <944C9C01-865B-4215-8C91-95F01AEA256E@gmail.com> <CAA7U3HPT_z2H3E84v9vOxKhAvCnv2SB2ikJDDkR7W1M+Sd-JSg@mail.gmail.com>
 <8DC3E474-3957-40B2-B492-D4AF2FDDD451@gmail.com> <0ACAE525-4FB2-4932-BBD2-F0623C4EBBFB@gmail.com>
 <52187852-ff8e-4e59-a8cf-7a29fd0a405b@isocpp.org> <8209A2E9-D947-4C00-A1F3-38F5676A4E52@gmail.com>
 <4c42f7c9-0588-4ab9-9af5-b2e692513993@isocpp.org> <225BBAAC-B3FA-4014-9FB6-64C48DF4208E@gmail.com>
 <1b70888c-eb6a-49e5-b254-a475ef015570@isocpp.org> <6CFC366C-D196-4A2E-B4EE-D1E6B26AE6C0@gmail.com>
 <3baba983-4d62-4887-a969-020ecf027a45@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_FDCA0442-3931-4935-B9D3-C87EA8CBF473"
X-Trace: ger.gmane.org 1405178655 24426 80.91.229.3 (12 Jul 2014 15:24:15 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 12 Jul 2014 15:24:15 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBENGQWPAKGQEVCW5BRI@isocpp.org Sat Jul 12 17:24:06 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBENGQWPAKGQEVCW5BRI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f69.google.com ([209.85.219.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBENGQWPAKGQEVCW5BRI@isocpp.org>)
	id 1X5z9f-0006Z8-TM
	for gclcip-std-proposals@m.gmane.org; Sat, 12 Jul 2014 17:24:04 +0200
Original-Received: by mail-oa0-f69.google.com with SMTP id i7sf3881457oag.8
        for <gclcip-std-proposals@m.gmane.org>; Sat, 12 Jul 2014 08:24:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=hviHi6BzeRXo8OIQAh2kDkaVnvhexRaHrrek4xI38rs=;
        b=NzuEfV1M6D8oXvurkFhS+ziZBfBZrgPbtTdkcXNckJvXbjPmhtQ3YYF9CjJSnLCcmp
         3jI24Ypz4jALpsO179VFqLk5Ugn0afVoqXal990vkb/KjxmNZ+zN+L2hcv4o8KPFpZHY
         5k6bwbKO3l7NHmVhRCKY4QQlBwwqHvsyu2sPgkflLBX8ql2UOwbtetcqPymPx5fu+sik
         aCmxXwS1h9dIz47u1K4mGTCAk0vd2IzLPEM+VgUnr3JKm3xXCFWhk+lftELgf3tV3WtB
         Zr9UOEjZJN2TdRHq7IkuvSImKxB1pLrKqfA9mt1vyt5+m8mNiEqBeMO1PTFSdYAv00B3
         prIQ==
X-Gm-Message-State: ALoCoQnvSbDJGRCRYpHD2JosnjXdg65NqkIX+ynrrqcpIdFEf0Q9bNvcEtcpabXTRK6oeKG2ko9g
X-Received: by 10.182.246.7 with SMTP id xs7mr2511438obc.15.1405178642867;
        Sat, 12 Jul 2014 08:24:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.61.237 with SMTP id t13ls159688igr.38.canary; Sat, 12 Jul
 2014 08:24:01 -0700 (PDT)
X-Received: by 10.50.221.99 with SMTP id qd3mr12608604igc.3.1405178641728;
        Sat, 12 Jul 2014 08:24:01 -0700 (PDT)
Original-Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [2607:f8b0:4001:c03::229])
        by mx.google.com with ESMTPS id w11si3040998igp.34.2014.07.12.08.24.01
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 12 Jul 2014 08:24:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:4001:c03::229 as permitted sender) client-ip=2607:f8b0:4001:c03::229;
Original-Received: by mail-ie0-f169.google.com with SMTP id tp5so1907440ieb.0
        for <std-proposals@isocpp.org>; Sat, 12 Jul 2014 08:24:01 -0700 (PDT)
X-Received: by 10.43.104.132 with SMTP id dm4mr11543288icc.56.1405178641549;
        Sat, 12 Jul 2014 08:24:01 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.34])
        by mx.google.com with ESMTPSA id jf5sm6368772igb.2.2014.07.12.08.23.59
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 12 Jul 2014 08:24:01 -0700 (PDT)
In-Reply-To: <3baba983-4d62-4887-a969-020ecf027a45@isocpp.org>
X-Mailer: Apple Mail (2.1878.6)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:4001:c03::229 as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11896
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11896>

--Apple-Mail=_FDCA0442-3931-4935-B9D3-C87EA8CBF473
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1


On 2014-07-12, at 8:57 PM, tomaszkam@gmail.com wrote:

> This will introduce a lot of temporaries in the code.

Most code tends to have a lot of temporaries anyway. Temporaries are a prod=
uct of value semantics, as opposed to reference semantics. Since rvalue ref=
erences introduce concerns of aliasing and referent lifetime, I think the l=
anguage should have the programmer mention std::move or std::forward when t=
hey are in effect, and specifically for the thing being referenced, not onl=
y its container.

No proposal from me will necessitate more temporaries :) . I like performan=
ce as much as anyone, but only within the limits of safety.

As for the rest, I think you're reading too much into the differences. The =
dilemma is between two different, equally expressive, conventions favoring =
references or values. Performance and safety are both possible with either.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

--Apple-Mail=_FDCA0442-3931-4935-B9D3-C87EA8CBF473
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014&=
ndash;07&ndash;12, at 8:57 PM, <a href=3D"mailto:tomaszkam@gmail.com">tomas=
zkam@gmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline"><blo=
ckquote type=3D"cite"><div style=3D"font-family: Helvetica; font-size: 12px=
; font-style: normal; font-variant: normal; font-weight: normal; letter-spa=
cing: normal; line-height: normal; orphans: auto; text-align: start; text-i=
ndent: 0px; text-transform: none; white-space: normal; widows: auto; word-s=
pacing: 0px; -webkit-text-stroke-width: 0px;"><div dir=3D"ltr">This will in=
troduce a lot of temporaries in the code. </div></div></blockquote><div><br=
></div><div>Most code tends to have a lot of temporaries anyway. Temporarie=
s are a product of value semantics, as opposed to reference semantics. Sinc=
e rvalue references introduce concerns of aliasing and referent lifetime, I=
 think the language should have the programmer mention std::move or std::fo=
rward when they are in effect, and specifically for the thing being referen=
ced, not only its container.</div><div><br></div><div>No proposal from me w=
ill necessitate more temporaries :) . I like performance as much as anyone,=
 but only within the limits of safety.</div></div><br><div>As for the rest,=
 I think you&rsquo;re reading too much into the differences. The dilemma is=
 between two different, equally expressive, conventions favoring references=
 or values. Performance and safety are both possible with either.</div><div=
><br></div></body></html>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_FDCA0442-3931-4935-B9D3-C87EA8CBF473--

.
