Navigation Menu

Skip to content

Commit

Permalink
doc coding-style: add memos
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 16, 2012
1 parent a82f0ec commit 3d65925
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/source/developer/coding_style.rst
Expand Up @@ -552,3 +552,16 @@ C++では真偽値に ``bool`` を使うためこのような状況は発生し
for (int i = 0; i < 10; ++i) {
}

その他
------

以下、具体例が必要。

* ビルド時にできることを実行時に延ばさない(静的チェックを活用)
* なるべく局所的に変数を定義し、同時に初期化する
* 長い関数や深いブロックのネストを避ける
* 2つに分けた方がよさそう。あと目安があるといいかも。
100行以上は長いよねーとか3段以上はデンジャーとか。
* 必要以上にオブジェクトを複製しない
* 暗黙の型変換はなるべく避ける
* assertを積極的に使う

0 comments on commit 3d65925

Please sign in to comment.