Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #723

Re: Is removing necessity of std::move for local variables used for the last time a good proposal?

Message-ID <lmuonb$ofa$1@dont-email.me> (permalink)
Newsgroups comp.std.c++
From Daniel Krügler <daniel.kruegler@googlemail.com>
Subject Re: Is removing necessity of std::move for local variables used for the last time a good proposal?
Organization A noiseless patient Spider
References <874c0712-4aed-4a8f-991e-b064daa5000f@googlegroups.com> <263da605-5281-469e-86b4-6209739c6133@googlegroups.com> <e57b95aa-61dd-4669-aad5-08354bdec680@googlegroups.com>
Date 2014-06-08 01:32 -0600

Show all headers | View raw


Am 07.06.2014 10:33, schrieb Piotr Nycz:
>
> Well, I just followed this guidance:
> "The public can submit proposed defect reports via the Internet news
> group comp.std.c++ "
> from C++ standard webpage
> (http://www.open-std.org/jtc1/sc22/wg21/docs/standards#14882).
>
> And I have no idea how to find a "formal proof [...] that nothing
> could go wrong".
>
> I hope this is everything from my side to raise this issue to C++
> standard folks - but if I am wrong - please tell me.


I couldn't find anything in your description that could be considered
to be comparable to a defect report. As I read it, you have thought
about relaxing the existing rules involving value considerations by
the compiler during copy-like operations. Well, such thoughts have
been expressed a lot of (including by members of the committee), but
those thoughts alone do not imply that there is a defect in the
current rules, because - as Sebastian's response implies - constraints
exist to prevent possible situations that could lead to surprising
results or buggy programs. Not many people would like to get the rumor
to be known as the originator of the "most vexing rule of C++
involving compiler transformations".

If you think that such relaxation of the existing rules should be
considered, I recommend to write a proposal that provides use-cases
and some good reasoning about the advantages and attempts to find
possible disadvantages.

There is no need for any formal proof, that "nothing could go wrong",
but keep in mind that the standard has impact on the code of millions
of line of code and therefore naturally the resistance to introduce
potentially broken rules is high, therefore my advice is that your
proposal should be written having such resistance in your mind. Note
also that the motivation for such a change must exceed a critical
mass. Surely the committee won't change the rules, because someone
argues that he dislikes to write std::move(e) over e. Keep also in
mind, that std::move is not the only possible form to transform the
value category of some expression, so ensure that your wording does
not read as if you don't like the library component std::move.

To write a proposal, please read

https://isocpp.org/std/submit-a-proposal

Given your description, ensure that your proposal addresses the project

"Programming Language C++, Evolution Working Group"

HTH & Greetings from Bremen,

Daniel Krügler


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Is removing necessity of std::move for local variables used for the  last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-05-30 15:32 -0600
  Re: Is removing necessity of std::move for local variables used for  the  last time a good proposal? SG <s.gesemann@googlemail.com> - 2014-06-05 12:31 -0600
    Re: Is removing necessity of std::move for local variables used for  the  last time a good proposal? Kalle Olavi Niemitalo <kon@iki.fi> - 2014-06-07 01:25 -0600
    Re: Is removing necessity of std::move for local variables used for   the  last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-06-07 02:33 -0600
      Re: Is removing necessity of std::move for local variables used for   the  last time a good proposal? Daniel Krügler <daniel.kruegler@googlemail.com> - 2014-06-08 01:32 -0600
        Re: Is removing necessity of std::move for local variables used for    the  last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-06-17 07:25 -0600

csiph-web