Fwd: C++ styleguide updated: mutable references and more

265 views
Skip to first unread message

Leszek Swirski

unread,
Jun 3, 2020, 1:58:14 AM6/3/20
to v8-dev
FYI, there have been some Chromium C++ style changes, which are changes V8 also implicitly inherits.

---------- Forwarded message ---------
From: 'Peter Kasting' via blink-dev <blin...@chromium.org>
Date: Wed, 3 Jun 2020, 00:19
Subject: [blink-dev] C++ styleguide updated: mutable references and more
To: Chromium-dev <chromi...@chromium.org>, blink-dev <blin...@chromium.org>


TLDR: The public Google C++ styleguide has been updated with a variety of changes, most significantly allowing mutable reference arguments.

Recently the public Google styleguide was updated with a number of significant changes.  Here are the biggest ones, and how they affect Chromium:

No effect:
Affects Chromium but not Blink:
  • For output and in/out parameters that cannot be null, Google now prefers mutable references, instead of pointers.  This is roughly equivalent to existing Blink style; the Blink styleguide has therefore been updated to remove mention of this, since it is no longer a divergence from Chromium style.  Note that return values are still preferred over output parameters, including when a function needs to return multiple values.
Affects Chromium and Blink:
Finally, this is a good time to remind people that DISALLOW_COPY_AND_ASSIGN is deprecated in new code; explicitly delete the copy/assign operators between your constructors and destructor.

As always, if you have questions or feedback about C++ style, send mail to c...@chromium.org and/or hop on the #cxx channel on the Chromium Slack.

PK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFCjkzCQSJNkOnt6Wh%3DDq1KEoNp56h_60M6iGTJtTY_LMw%40mail.gmail.com.

Michael Lippautz

unread,
Jun 19, 2020, 3:18:53 AM6/19/20
to v8-...@googlegroups.com
PSA: https://chromium-review.googlesource.com/c/v8/v8/+/2252185

(Chromium is also changing but V8 does not make use of those tools.)

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAGRskv9Z0pb%3D_cucryYEQM296KtvVmw6gdzL-9GmCiD9UgQG9A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages