220 25478 <CALQmNFgoV-Rg4T6+KqMFt6vNa7GCDpU=jVLRcnK4dDd+eBby8A@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Sean Middleditch <sean@middleditch.us>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Relocation as a solution for the valueless
 variant problem?
Date: Thu, 7 Apr 2016 22:10:06 -0700
Lines: 391
Approved: news@gmane.org
Message-ID: <CALQmNFgoV-Rg4T6+KqMFt6vNa7GCDpU=jVLRcnK4dDd+eBby8A@mail.gmail.com>
References: <b4feb52d-4cd0-475f-9f3d-6694564bc1b0@isocpp.org>
	<4187538d-68fa-4582-ba26-f406479abe67@isocpp.org>
	<eafd831f-85d2-430c-9969-7d084e6d28d2@isocpp.org>
	<CALQmNFggBQSADjEqS7pEzcdPSStGJfXkJdX0d2CwW_TmwqA=yQ@mail.gmail.com>
	<105d82bc-e1cf-4795-894c-112cd591c3af@isocpp.org>
	<CALQmNFja3Kt1XRR8S7Qr3rOktChVzuDGO7ZtSaQpsWaohU6wAA@mail.gmail.com>
	<4f31b957-05be-47cf-a1ca-03f33a9900c0@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113dc8ba4cbd21052ff23566
X-Trace: ger.gmane.org 1460092209 9210 80.91.229.3 (8 Apr 2016 05:10:09 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 8 Apr 2016 05:10:09 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCDODCNR2QPRBL72TS4AKGQEN3T2XZQ@isocpp.org Fri Apr 08 07:10:09 2016
Return-path: <std-proposals+bncBCDODCNR2QPRBL72TS4AKGQEN3T2XZQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCDODCNR2QPRBL72TS4AKGQEN3T2XZQ@isocpp.org>)
	id 1aoOgK-00088I-Q9
	for gclcip-std-proposals@m.gmane.org; Fri, 08 Apr 2016 07:10:09 +0200
Original-Received: by mail-io0-f200.google.com with SMTP id k184sf183600863ioe.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 07 Apr 2016 22:10:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:date
         :message-id:subject:from: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=gyq8ErL+7fJAWG41ECbY+ApnKJADSV9mlUdgkQuKZFM=;
        b=Qcu2pJOnNUqAj7NntiVFf5XW/ExLyR2wQNf2GWaT2Q7FJc667BlOMeGE9uzNtzvhfK
         xe425VDegBIwxv4PDAh7nOR3ahzdpsFF9yedRR890h6ZJyckfnNZiXacmrWQLWWIgbdu
         2TbvWXdJc++A1qhK9RDsMTusZtDdd2fPSofkzYG5Kp0SaycMY2CDz1mwfG/bJ1DiX062
         W6amzGO13dHXFrHhsiBKtmCsPVD0xIcmori/14A7gS/KqslgLS1M9bsbiPzeQhpTx8xQ
         GGniwozP80kjV4mLxWp0GnlZ09k5KukhoHZ8joyVuM///nQYIg2vNmwDip3jICc99YXA
         w50w==
X-Gm-Message-State: AD7BkJLKwF3P+g79oH9+/NwdWIQnTgTaVUWctxb0gUZweqQTHjJhtrlp4BVJGg58o1Ogow==
X-Received: by 10.107.128.22 with SMTP id b22mr4825762iod.10.1460092207800;
        Thu, 07 Apr 2016 22:10:07 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.84.72 with SMTP id k66ls2239978qgd.2.gmail; Thu, 07 Apr
 2016 22:10:06 -0700 (PDT)
X-Received: by 10.159.37.104 with SMTP id 95mr3190795uaz.85.1460092206709;
        Thu, 07 Apr 2016 22:10:06 -0700 (PDT)
Original-Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com. [2607:f8b0:400c:c05::236])
        by mx.google.com with ESMTPS id 103si2582341vkq.200.2016.04.07.22.10.06
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 07 Apr 2016 22:10:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of sean.middleditch@gmail.com designates 2607:f8b0:400c:c05::236 as permitted sender) client-ip=2607:f8b0:400c:c05::236;
Original-Received: by mail-vk0-x236.google.com with SMTP id t129so39408391vkg.2
        for <std-proposals@isocpp.org>; Thu, 07 Apr 2016 22:10:06 -0700 (PDT)
X-Received: by 10.31.33.137 with SMTP id h131mr3307137vkh.24.1460092206363;
 Thu, 07 Apr 2016 22:10:06 -0700 (PDT)
Original-Sender: sean.middleditch@gmail.com
Original-Received: by 10.159.41.103 with HTTP; Thu, 7 Apr 2016 22:10:06 -0700 (PDT)
In-Reply-To: <4f31b957-05be-47cf-a1ca-03f33a9900c0@isocpp.org>
X-Original-Sender: sean@middleditch.us
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 sean.middleditch@gmail.com designates 2607:f8b0:400c:c05::236 as permitted
 sender) smtp.mailfrom=sean.middleditch@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:25478
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25478>

--001a113dc8ba4cbd21052ff23566
Content-Type: text/plain; charset=UTF-8

On Thu, Apr 7, 2016 at 9:38 PM,  <isocppgroup@denisbider.com> wrote:
> Hey Sean,
>
> if you would like to see move destruction / relocation proposed in a safer
> form, do you have any ideas about what that safer form would look like?

Not with great specifics, or else I'd have written a paper on this. :)

I'd imagine it'd have something to do with value categories. The ideal is
to ensure that the compiler can statically detect moved-from objects and
disable destructor execution and provide diagnostics when the variable is
used, unless reinitialized explicitly.

>
> You refer to that modern C++ discourages direct use of new and delete.
Well,
> yes, of course. But libraries still need to use new and delete, as well as
> placement new, to implement containers. How would you propose implementing

They need no such thing. They use allocators. Allocators then need to use
placement new (and never delete) in almost all cases, but that is deeply
separate from most user code. Very few C++ users have written custom
allocators. Or even custom containers.

> the standard library without these features?

You're forming strawmen. The standard library can be implemented purely
with compiler intrinsics for all it matters in this context.

>
> It is not the intention of this Relocator proposal to be used directly by
> end users. The intention is that it would be used in STL implementations,
to
> solve problems that a lack of destructive move makes difficult.

It's a partial solution (it solves a minor efficiency problem for vector
and... what else? we've already gone over how it doesn't fix variant) and
involves a new form of constructor, new defaulted function rules, and so
on. It's a ton of work to add to the standardese and a ton of work to
implement for exceedinly little pay-off and leaves us still needing
_another_ solution for the other problems that make users (not just a
handful of stdlib implementors) clamor for destructive move.

It'd be like adding an incomplete version of move semantics that just added
a new special syntax for move construction without also adding rvalue
references or the extended value categories.

Nobody has yet proven that we need to settle for a complicated
half-solution. So let's not settle. :)

>
> Language users should not have to worry about invoking or implementing
> relocators, in much the same way they shouldn't have to worry about move
> constructors. Language users should use standard library types, and it's
up
> to the library types to implement relocators and move constructors.

In which case, we just need a new type trait and some rules in the standard
containers, and _zero_ new language features. Which game engine stdlib
replacements have been doing for over a decade. :)

>
> If you have any ideas of how the proposed feature can be made safer, I
would
> love to hear about it.

My very rough ideas would be to study value categories and rules and find
the set of categories that allow for in-place object destruction and
marking an object as "expired" so that the compiler knows it doesn't have
to invoke destructors. This also ties into lifetimes, and possibly needs to
integrate with a more nuanced notion of object lifetime in C++ (and hence
possibly should be "bundled" with lifetime extension a la N4221
<https://isocpp.org/files/papers/N4221.pdf>)

No, that's not a complete idea. I'm not saying I have a magic solution. It
may well take _years_ to get any version of this right. If these things
were easy or obvious, C++98 would have been a perfect language that never
needed another revision ever again. :p

>
> However, this is not to be mistaken for a feature that end users should
> directly use.

Then it has no reason to be a heavy-weight feature requiring such extensive
compiler support. If it's just for stdlib implementors and stdlib types,
they can already offer relocation completely today as a point of QoI via
private type traits purely in library code. 100% guarantee it, as I
primarily use one that does just that.

However, it turns out that "stdlib only" is not actually useful because (a)
stdlib containers want to support user-provided types at full
functionality, (b) some users do still need to write new containers given
how anemic the stdlib is, and (c) relocation as you've proposed doesn't
solve any particularly interesting or complicated problems worth the burden
it imposes on implementors.

You should either make your proposal much simpler pure-library affair or
you should think bigger and try to solve a much larger set of the problems
that destructive move / relocation could be solving. What you have now is
heavy-weight but only solves a very mundane problem.

>
>
> On Wednesday, April 6, 2016 at 10:45:09 PM UTC-6, Sean Middleditch wrote:
>>
>>
>> On Apr 6, 2016 9:55 AM, <isocp...@denisbider.com> wrote:
>> >
>> > > The committee can mandate that standard library types all have
>> > > relocators added where necessary but it can do no such thing for
>> > > user types. However, the committee _does_ want to allow variant
>> > > to be used with those same problematic user types.
>> >
>> >
>> > With respect to variant, it is already a major advantage of relocation
>> > that it can support:
>> >
>> > - exception-safe use of variant with non-nullable standard library
types
>> > - without requiring an existing std::list implementation to be thrown
away
>> > so it can be nothrow_move_constructible;
>> >
>> > - exception-safe use of variant with future non-nullable types.
>>
>> But not "exception safe" for other types, meaning that it still requires
>> the work around with the valueless state. So we go from a "mostly never
>> empty" container to a "slightly more mostly never empty" container. :)
>>
>> >
>> >
>> > Existing problematic non-library types can of course still be
supported,
>> > if we're willing to lose the strong exception safety guarantee in that
case.
>> > I'm not sure there is a silver bullet that can avoid that.
>> >
>> >
>> > > With your proposal, it's way too easy to accidentally leave
>> > > some object in an undefined state
>> >
>> > I find this logic highly questionable. By this line of reasoning, we
>> > should remove placement new, C-style casts, and manual memory
management, so
>> > that C++ might become a managed language.
>>
>> Not at all, and that's quite the logical jump. For one, your feature
>> doesn't actually exist yet, while those others do; adding unsafe features
>> and keeping old unsafe features (that we actually _do_ kinda-sorta
>> deprecate, e.g. the modern advice to never ever use new/delete or C-style
>> casts) for back-compat are two very different things. :)
>>
>> For two, there are degrees of ease-of- misuse and not just a binary
>> equation of assembly vs C# :)  Rust for instance is a case of going too
far
>> with protecting users from mistakes and going straight into forcing
users to
>> jump through hoops to convince the compiler of the validity of perfectly
>> valid code. It errs completely on the side of safety. Nobody is
(seriously)
>> advocating that for C++. Neither should we be advocating to adding more
>> C-level-dangerous constructs to C++ without darn good reason. Half-fixing
>> variant and not actually fixing many _other_ major problems that
destructive
>> move could solve (e.g., accidentally using a moved-from parameter
instead of
>> the moved-to member in a class constructor).
>>
>> For three, your feature proposal opens whole new classes of mistakes than
>> what we have today. The only mechanism even close to being as dangerous
is
>> delete/free and modern C++ all but deprecates those features in user
code,
>> even in high-performance situations like AAA games. A "good" destructive
>> move should _reduce_ errors in existing code -- like accidentally using
>> moved-from values -- rather than adding new ones. Performance alone isn't
>> good enough. Remember, rvalue references _real_ goal was to allow us to
>> replace things like the easy-to-misuse auto_ptr with the much superior
>> unique_ptr. The potential performance improvements of move semantics were
>> icing on the cake.
>>
>> Now let's be clear: the intent of relocation is good. We need someone
>> working on this, IMO. I'm more than happy to see you work on it; you seem
>> like a pretty bright person and are obviously passionate about the
issue. I
>> just strongly think that the proposal you currently have just isn't
"there"
>> yet and needs more design iteration. :)
>>
>> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/a/isocpp.org/d/topic/std-proposals/jdY0hieE0E0/unsubscribe
..
> To unsubscribe from this group and all its topics, 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/4f31b957-05be-47cf-a1ca-03f33a9900c0%40isocpp.org
..



-- 
Sean Middleditch
http://seanmiddleditch.com

-- 
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/CALQmNFgoV-Rg4T6%2BKqMFt6vNa7GCDpU%3DjVLRcnK4dDd%2BeBby8A%40mail.gmail.com.

--001a113dc8ba4cbd21052ff23566
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thu, Apr 7, 2016 at 9:38 PM, =C2=A0&lt;<a href=3D"mailt=
o:isocppgroup@denisbider.com">isocppgroup@denisbider.com</a>&gt; wrote:<br>=
&gt; Hey Sean,<br>&gt;<br>&gt; if you would like to see move destruction / =
relocation proposed in a safer<br>&gt; form, do you have any ideas about wh=
at that safer form would look like?<br><br>Not with great specifics, or els=
e I&#39;d have written a paper on this. :)<br><br>I&#39;d imagine it&#39;d =
have something to do with value categories. The ideal is to ensure that the=
 compiler can statically detect moved-from objects and disable destructor e=
xecution and provide diagnostics when the variable is used, unless reinitia=
lized explicitly.<br><br>&gt;<br>&gt; You refer to that modern C++ discoura=
ges direct use of new and delete. Well,<br>&gt; yes, of course. But librari=
es still need to use new and delete, as well as<br>&gt; placement new, to i=
mplement containers. How would you propose implementing<br><br>They need no=
 such thing. They use allocators. Allocators then need to use placement new=
 (and never delete) in almost all cases, but that is deeply separate from m=
ost user code. Very few C++ users have written custom allocators. Or even c=
ustom containers.<br><br>&gt; the standard library without these features?<=
br><br>You&#39;re forming strawmen. The standard library can be implemented=
 purely with compiler intrinsics for all it matters in this context.<br><br=
>&gt;<br>&gt; It is not the intention of this Relocator proposal to be used=
 directly by<br>&gt; end users. The intention is that it would be used in S=
TL implementations, to<br>&gt; solve problems that a lack of destructive mo=
ve makes difficult.<br><br>It&#39;s a partial solution (it solves a minor e=
fficiency problem for vector and... what else? we&#39;ve already gone over =
how it doesn&#39;t fix variant) and involves a new form of constructor, new=
 defaulted function rules, and so on. It&#39;s a ton of work to add to the =
standardese and a ton of work to implement for exceedinly little pay-off an=
d leaves us still needing _another_ solution for the other problems that ma=
ke users (not just a handful of stdlib implementors) clamor for destructive=
 move.<br><br>It&#39;d be like adding an incomplete version of move semanti=
cs that just added a new special syntax for move construction without also =
adding rvalue references or the extended value categories.<br><br>Nobody ha=
s yet proven that we need to settle for a complicated half-solution. So let=
&#39;s not settle. :)<br><br>&gt;<br>&gt; Language users should not have to=
 worry about invoking or implementing<br>&gt; relocators, in much the same =
way they shouldn&#39;t have to worry about move<br>&gt; constructors. Langu=
age users should use standard library types, and it&#39;s up<br>&gt; to the=
 library types to implement relocators and move constructors.<br><br>In whi=
ch case, we just need a new type trait and some rules in the standard conta=
iners, and _zero_ new language features. Which game engine stdlib replaceme=
nts have been doing for over a decade. :)<br><br>&gt;<br>&gt; If you have a=
ny ideas of how the proposed feature can be made safer, I would<br>&gt; lov=
e to hear about it.<br><br>My very rough ideas would be to study value cate=
gories and rules and find the set of categories that allow for in-place obj=
ect destruction and marking an object as &quot;expired&quot; so that the co=
mpiler knows it doesn&#39;t have to invoke destructors. This also ties into=
 lifetimes, and possibly needs to integrate with a more nuanced notion of o=
bject lifetime in C++ (and hence possibly should be &quot;bundled&quot; wit=
h lifetime extension a la <a href=3D"https://isocpp.org/files/papers/N4221.=
pdf">N4221</a>)<br><br>No, that&#39;s not a complete idea. I&#39;m not sayi=
ng I have a magic solution. It may well take _years_ to get any version of =
this right. If these things were easy or obvious, C++98 would have been a p=
erfect language that never needed another revision ever again. :p<div><br><=
/div><div>&gt;<br>&gt; However, this is not to be mistaken for a feature th=
at end users should<br>&gt; directly use.<br><br>Then it has no reason to b=
e a heavy-weight feature requiring such extensive compiler support. If it&#=
39;s just for stdlib implementors and stdlib types, they can already offer =
relocation completely today as a point of QoI via private type traits purel=
y in library code. 100% guarantee it, as I primarily use one that does just=
 that.<br><br>However, it turns out that &quot;stdlib only&quot; is not act=
ually useful because (a) stdlib containers want to support user-provided ty=
pes at full functionality, (b) some users do still need to write new contai=
ners given how anemic the stdlib is, and (c) relocation as you&#39;ve propo=
sed doesn&#39;t solve any particularly interesting or complicated problems =
worth the burden it imposes on implementors.<br><br>You should either make =
your proposal much simpler pure-library affair or you should think bigger a=
nd try to solve a much larger set of the problems that destructive move / r=
elocation could be solving. What you have now is heavy-weight but only solv=
es a very mundane problem.<br><br>&gt;<br>&gt;<br>&gt; On Wednesday, April =
6, 2016 at 10:45:09 PM UTC-6, Sean Middleditch wrote:<br>&gt;&gt;<br>&gt;&g=
t;<br>&gt;&gt; On Apr 6, 2016 9:55 AM, &lt;<a href=3D"mailto:isocp...@denis=
bider.com">isocp...@denisbider.com</a>&gt; wrote:<br>&gt;&gt; &gt;<br>&gt;&=
gt; &gt; &gt; The committee can mandate that standard library types all hav=
e<br>&gt;&gt; &gt; &gt; relocators added where necessary but it can do no s=
uch thing for<br>&gt;&gt; &gt; &gt; user types. However, the committee _doe=
s_ want to allow variant<br>&gt;&gt; &gt; &gt; to be used with those same p=
roblematic user types.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; W=
ith respect to variant, it is already a major advantage of relocation<br>&g=
t;&gt; &gt; that it can support:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; - except=
ion-safe use of variant with non-nullable standard library types<br>&gt;&gt=
; &gt; - without requiring an existing std::list implementation to be throw=
n away<br>&gt;&gt; &gt; so it can be nothrow_move_constructible;<br>&gt;&gt=
; &gt;<br>&gt;&gt; &gt; - exception-safe use of variant with future non-nul=
lable types.<br>&gt;&gt;<br>&gt;&gt; But not &quot;exception safe&quot; for=
 other types, meaning that it still requires<br>&gt;&gt; the work around wi=
th the valueless state. So we go from a &quot;mostly never<br>&gt;&gt; empt=
y&quot; container to a &quot;slightly more mostly never empty&quot; contain=
er. :)<br>&gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Exist=
ing problematic non-library types can of course still be supported,<br>&gt;=
&gt; &gt; if we&#39;re willing to lose the strong exception safety guarante=
e in that case.<br>&gt;&gt; &gt; I&#39;m not sure there is a silver bullet =
that can avoid that.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; &gt=
; With your proposal, it&#39;s way too easy to accidentally leave<br>&gt;&g=
t; &gt; &gt; some object in an undefined state<br>&gt;&gt; &gt;<br>&gt;&gt;=
 &gt; I find this logic highly questionable. By this line of reasoning, we<=
br>&gt;&gt; &gt; should remove placement new, C-style casts, and manual mem=
ory management, so<br>&gt;&gt; &gt; that C++ might become a managed languag=
e.<br>&gt;&gt;<br>&gt;&gt; Not at all, and that&#39;s quite the logical jum=
p. For one, your feature<br>&gt;&gt; doesn&#39;t actually exist yet, while =
those others do; adding unsafe features<br>&gt;&gt; and keeping old unsafe =
features (that we actually _do_ kinda-sorta<br>&gt;&gt; deprecate, e.g. the=
 modern advice to never ever use new/delete or C-style<br>&gt;&gt; casts) f=
or back-compat are two very different things. :)<br>&gt;&gt;<br>&gt;&gt; Fo=
r two, there are degrees of ease-of- misuse and not just a binary<br>&gt;&g=
t; equation of assembly vs C# :) =C2=A0Rust for instance is a case of going=
 too far<br>&gt;&gt; with protecting users from mistakes and going straight=
 into forcing users to<br>&gt;&gt; jump through hoops to convince the compi=
ler of the validity of perfectly<br>&gt;&gt; valid code. It errs completely=
 on the side of safety. Nobody is (seriously)<br>&gt;&gt; advocating that f=
or C++. Neither should we be advocating to adding more<br>&gt;&gt; C-level-=
dangerous constructs to C++ without darn good reason. Half-fixing<br>&gt;&g=
t; variant and not actually fixing many _other_ major problems that destruc=
tive<br>&gt;&gt; move could solve (e.g., accidentally using a moved-from pa=
rameter instead of<br>&gt;&gt; the moved-to member in a class constructor).=
<br>&gt;&gt;<br>&gt;&gt; For three, your feature proposal opens whole new c=
lasses of mistakes than<br>&gt;&gt; what we have today. The only mechanism =
even close to being as dangerous is<br>&gt;&gt; delete/free and modern C++ =
all but deprecates those features in user code,<br>&gt;&gt; even in high-pe=
rformance situations like AAA games. A &quot;good&quot; destructive<br>&gt;=
&gt; move should _reduce_ errors in existing code -- like accidentally usin=
g<br>&gt;&gt; moved-from values -- rather than adding new ones. Performance=
 alone isn&#39;t<br>&gt;&gt; good enough. Remember, rvalue references _real=
_ goal was to allow us to<br>&gt;&gt; replace things like the easy-to-misus=
e auto_ptr with the much superior<br>&gt;&gt; unique_ptr. The potential per=
formance improvements of move semantics were<br>&gt;&gt; icing on the cake.=
<br>&gt;&gt;<br>&gt;&gt; Now let&#39;s be clear: the intent of relocation i=
s good. We need someone<br>&gt;&gt; working on this, IMO. I&#39;m more than=
 happy to see you work on it; you seem<br>&gt;&gt; like a pretty bright per=
son and are obviously passionate about the issue. I<br>&gt;&gt; just strong=
ly think that the proposal you currently have just isn&#39;t &quot;there&qu=
ot;<br>&gt;&gt; yet and needs more design iteration. :)<br>&gt;&gt;<br>&gt;=
&gt; &gt;<br>&gt;<br>&gt; --<br>&gt; You received this message because you =
are subscribed to a topic in the<br>&gt; Google Groups &quot;ISO C++ Standa=
rd - Future Proposals&quot; group.<br>&gt; To unsubscribe from this topic, =
visit<br>&gt; <a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std=
-proposals/jdY0hieE0E0/unsubscribe">https://groups.google.com/a/isocpp.org/=
d/topic/std-proposals/jdY0hieE0E0/unsubscribe</a>.<br>&gt; To unsubscribe f=
rom this group and all its topics, send an email to<br>&gt; <a href=3D"mail=
to:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp=
..org</a>.<br>&gt; To post to this group, send email to <a href=3D"mailto:st=
d-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br>&gt; To view this =
discussion on the web visit<br>&gt; <a href=3D"https://groups.google.com/a/=
isocpp.org/d/msgid/std-proposals/4f31b957-05be-47cf-a1ca-03f33a9900c0%40iso=
cpp.org">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4f31b=
957-05be-47cf-a1ca-03f33a9900c0%40isocpp.org</a>.<br><br><br><br>-- <br>Sea=
n Middleditch<br><a href=3D"http://seanmiddleditch.com">http://seanmiddledi=
tch.com</a></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/CALQmNFgoV-Rg4T6%2BKqMFt6vNa7GCDpU%3D=
jVLRcnK4dDd%2BeBby8A%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALQmNFgoV-=
Rg4T6%2BKqMFt6vNa7GCDpU%3DjVLRcnK4dDd%2BeBby8A%40mail.gmail.com</a>.<br />

--001a113dc8ba4cbd21052ff23566--

.
