--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiEEGrQLowJd2n_bA8gndb1ZjDi5aGKpTAzdsMR927EEeQ%40mail.gmail.com.
I'd suggest preparing a change to styleguide/c++/c++11.html and sending a short rfc for that that to cxx@. I'd guess nobody would have a problem with moving to = delete at this point.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFC4SW7fS8%3Dde2h8gMqPntgFOzRKOFR3tpD9XtsHaJjwPg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACuR13d%2BHAwG%2BA0N5KbQsUMvDzx48Vssz4PfQAFdY4b-NPcdUg%40mail.gmail.com.
I believe last time we discussed it, there were a few cons to the "= delete" syntax that were brought up:- Ambiguity about where it should be in the C++ file (still last? at the top?). If no strong guidance, it means it will be inconsistent and reviewer has to do more work to see if there.
- More lines of code thus more noise to read vs. a single macro people have to be aware of.- Inconsistency between existing code and new code if we don't do a rewrite of everything.- Easier to get wrong (i.e. the macro does the right thing - with the explicit spelling out, you can omit one of the constructors, etc).
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFAay9zJfZHmEk8h_qbC8_VajhCE0SQEOEAJQzrP%3DF6UJA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEmk%3DMYru8PmvkgoMpxbU9ErtnY4W8E1DmcywTux0%2BAvBgwWaA%40mail.gmail.com.
On Wed, Jul 31, 2019 at 5:48 PM K Moon <km...@chromium.org> wrote:Ping? Recently ran into the same issue. The public C++ style guide seems to endorse the "= delete" syntax, but doesn't forbid DISALLOW_COPY_AND_ASSIGN (which it doesn't know about, of course, since DISALLOW_COPY_AND_ASSIGN is part of base), and there's no deprecation notice on the macro. It "feels" like "= delete" is the right thing to do, but it's fuzzy enough to be confusing.
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACwGi-4n_r6pX48zc_YRaKz0xzzk_ee4y6zUXOUz4BWzSybcaw%40mail.gmail.com.
I share danakj's opinion. Besides consistency, it's also more concise (1 line instead of 2) - and easier to get right (i.e. requires less time for author and CL reviewer since the statement is simpler).On Fri, Aug 2, 2019 at 11:06 AM <dan...@chromium.org> wrote:On Wed, Jul 31, 2019 at 8:48 PM K Moon <km...@chromium.org> wrote:On Wed, Jul 31, 2019 at 5:48 PM K Moon <km...@chromium.org> wrote:Ping? Recently ran into the same issue. The public C++ style guide seems to endorse the "= delete" syntax, but doesn't forbid DISALLOW_COPY_AND_ASSIGN (which it doesn't know about, of course, since DISALLOW_COPY_AND_ASSIGN is part of base), and there's no deprecation notice on the macro. It "feels" like "= delete" is the right thing to do, but it's fuzzy enough to be confusing.My take is that I believe the macro is useful and common enough that we should continue to use it unless we're going to rewrite everything to =delete instead. Since that is surely not worth anyone's time, I would say we should just keep using the macro. We could add it to documentation to make that more clear.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAKFU2SAtdGjLMMnbUOE0i7xUHOWYgiRTmgWkYZg3v2L%3D--t_EA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJTZ7LLapscOYbkBXxYLAZG_P8ep6vFSALNT4FvokcmEZLUS%2Bg%40mail.gmail.com.
public section of the declaration.To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACwGi-7Su7MHerXCHCm07i3wTDmhXqU7PFaQnvAojZq3q5CtuQ%40mail.gmail.com.
Based on pkasting's notes about the changes in the Google C++ style guide (and that we have no good reason to override it for Chromium's needs), it seems it's clear that we should deprecate/ban DISALLOW_COPY_AND_ASSIGN() and spawn a code maintenance project to replace all existing ones with =delete.
In the interest of not recommending two ways to do something, if we agree that recommending =delete in new code is the right thing, then let's add a note to base/macros.h reflecting that.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAKFU2SDdNRXq9ddeGU5MK9JXqeqR4Lk1aud_U%3Dmqs8gYSKGbvQ%40mail.gmail.com.
However, from the thread, we didn't reach an agreement?