Commit 7675e748 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[base] Surface 'Design & naming' section in base/README.md

I just learned about these guidelines through
https://chromium-review.googlesource.com/c/chromium/src/+/1340802/18#message-b68ecbafe6212025dd856998736431eea6a19991
and think they should be surfaced in base/OWNERS (which points to
base/README.md).

R=dcheng@chromium.org

Change-Id: I0acf3eec7a2d4e888eac4d15e9e8fbf8ad7acf02
Reviewed-on: https://chromium-review.googlesource.com/c/1422742Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625211}
parent 1aa6cb92
...@@ -32,6 +32,16 @@ under components/ instead. ...@@ -32,6 +32,16 @@ under components/ instead.
Owners are added when a contributor has shown the above qualifications and Owners are added when a contributor has shown the above qualifications and
when they express interest. There isn't an upper bound on the number of OWNERS. when they express interest. There isn't an upper bound on the number of OWNERS.
## Design and naming
* Be sure to use the base namespace.
* STL-like constructs should adhere as closely to STL as possible. Functions
and behaviors not present in STL should only be added when they are related
to the specific data structure implemented by the container.
* For STL-like constructs our policy is that they should use STL-like naming
even when it may conflict with the style guide. So functions and class names
should be lower case with underscores. Non-STL-like classes and functions
should use Google naming.
## Performance testing ## Performance testing
Since the primitives provided by //base are used very widely, it is important to Since the primitives provided by //base are used very widely, it is important to
......
...@@ -14,6 +14,8 @@ is broad applicability. ...@@ -14,6 +14,8 @@ is broad applicability.
### Design and naming ### Design and naming
Fundamental [//base principles](../README.md#design-and-naming) apply, i.e.:
Containers should adhere as closely to STL as possible. Functions and behaviors Containers should adhere as closely to STL as possible. Functions and behaviors
not present in STL should only be added when they are related to the specific not present in STL should only be added when they are related to the specific
data structure implemented by the container. data structure implemented by the container.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment