PSA: Chromium style no longer prefers FOO over kFoo for enums

40 views
Skip to first unread message

Nico Weber

unread,
Apr 13, 2017, 4:13:54 PM4/13/17
to Chromium-dev
Hi,

https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md used to have a paragraph saying that we prefer FOO over kFoo. That paragraph is gone as of https://codereview.chromium.org/2820553002 , which means we now use the guidance from the Google style guide instead: Both FOO and kFoo for enums are fine, but kFoo is preferred. This makes the Chromium C++ styleguide a bit shorter, and more unified with Google and Blink style.

Nico

Peter Kasting

unread,
Apr 13, 2017, 5:26:37 PM4/13/17
to Nico Weber, Chromium-dev
On Thu, Apr 13, 2017 at 1:13 PM, Nico Weber <tha...@chromium.org> wrote:
https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md used to have a paragraph saying that we prefer FOO over kFoo. That paragraph is gone as of https://codereview.chromium.org/2820553002 , which means we now use the guidance from the Google style guide instead: Both FOO and kFoo for enums are fine, but kFoo is preferred. This makes the Chromium C++ styleguide a bit shorter, and more unified with Google and Blink style.

To forestall style consistency questions: https://bugs.chromium.org/p/chromium/issues/detail?id=711332 is about rewriting existing uses to be consistent.  Status: P3 Available.

PK

Raymond Toy

unread,
Apr 13, 2017, 7:16:14 PM4/13/17
to Nico Weber, Chromium-dev
On Thu, Apr 13, 2017 at 1:13 PM, Nico Weber <tha...@chromium.org> wrote:
Hi,

https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md used to have a paragraph saying that we prefer FOO over kFoo. That paragraph is gone as of https://codereview.chromium.org/2820553002 , which means we now use the guidance from the Google style guide instead: Both FOO and kFoo for enums are fine, but kFoo is preferred. This makes the Chromium C++ styleguide a bit shorter, and more unified with Google and Blink style.


Is there still a Blink style? I thought The Great Renaming fixed that.

 
Nico

--
--
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+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiHMUsfdyBQ4rSixwCnudMXyHfZ%3DF2_iY%2B3dX%2BeykkD0Qg%40mail.gmail.com.

dan...@chromium.org

unread,
Apr 13, 2017, 7:31:38 PM4/13/17
to Raymond Toy, Nico Weber, Chromium-dev
On Thu, Apr 13, 2017 at 7:15 PM, 'Raymond Toy' via Chromium-dev <chromi...@chromium.org> wrote:


On Thu, Apr 13, 2017 at 1:13 PM, Nico Weber <tha...@chromium.org> wrote:
Hi,

https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md used to have a paragraph saying that we prefer FOO over kFoo. That paragraph is gone as of https://codereview.chromium.org/2820553002 , which means we now use the guidance from the Google style guide instead: Both FOO and kFoo for enums are fine, but kFoo is preferred. This makes the Chromium C++ styleguide a bit shorter, and more unified with Google and Blink style.


Is there still a Blink style? I thought The Great Renaming fixed that.


We should port that over to https://www.chromium.org/blink/coding-style, and resolve the discussions on it as a few things changed since it was first written in the process of doing the rewrite (like allowing Get prefix for getters).
 

 
Nico

--
--
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+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiHMUsfdyBQ4rSixwCnudMXyHfZ%3DF2_iY%2B3dX%2BeykkD0Qg%40mail.gmail.com.

--
--
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.
Reply all
Reply to author
Forward
0 new messages