Skip to content

Commit d0473f2

Browse files
committed
.
1 parent 2cff6a3 commit d0473f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

os/src/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
- functions are requested to be inlined assuming compilers won't adhere to the hint when it does not make sense, such as big functions called from multiple locations
1313
- functions called from only one location should be inlined
1414
* `const` is preferred and used where applicable
15-
* `let` and `mut` are defined as `auto const` and `auto` and used to declare variables or constants
15+
* `auto` is used when the type name is too verbose, such as iterators and templates; otherwise, types are spelled out for readability
16+
* `let` and `mut` are defined as `auto const` and `auto` and can be used to declare variables and immutables
1617
* `using namespace std;` is ok within namespace or implementation
1718
* right to left notation `some_type const &inst` instead of `const some_type &inst`
1819
- for consistency, `const` is written after the type such as `char const *ptr` instead of `const char *ptr` and `float const x` instead of `const float x`

0 commit comments

Comments
 (0)