[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] doc coding-style: add memos

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:39:15 JST 2012


Kouhei Sutou	2012-03-16 10:15:51 +0900 (Fri, 16 Mar 2012)

  New Revision: 3d659252b7f9baa3911f3e43e870c34084972fdb
  https://github.com/mroonga/mroonga/commit/3d659252b7f9baa3911f3e43e870c34084972fdb

  Log:
    doc coding-style: add memos

  Modified files:
    doc/source/developer/coding_style.rst

  Modified: doc/source/developer/coding_style.rst (+13 -0)
===================================================================
--- doc/source/developer/coding_style.rst    2012-03-16 10:13:14 +0900 (e085071)
+++ doc/source/developer/coding_style.rst    2012-03-16 10:15:51 +0900 (fd25fd3)
@@ -552,3 +552,16 @@ C++では真偽値に ``bool`` を使うためこのような状況は発生し
     for (int i = 0; i < 10; ++i) {
     }
 
+その他
+------
+
+以下、具体例が必要。
+
+  * ビルド時にできることを実行時に延ばさない(静的チェックを活用)
+  * なるべく局所的に変数を定義し、同時に初期化する
+  * 長い関数や深いブロックのネストを避ける
+    * 2つに分けた方がよさそう。あと目安があるといいかも。
+      100行以上は長いよねーとか3段以上はデンジャーとか。
+  * 必要以上にオブジェクトを複製しない
+  * 暗黙の型変換はなるべく避ける
+  * assertを積極的に使う
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index