少し複雑なメソッドを書くときは、その上に小さなコメント ブロックを追加することを好みます。
/*--------------------------------------------------------------+
| When I wrote this, only God and I understood what I was doing
| Now, God only knows
+-------------------------------------------------------------*/
- (void) overlyDifficultMethodToGrasp { ... }
私のコードからこのメソッドをコメントアウトする唯一の方法は、本当にヒットすることcmd + /
ですか? その結果、
///*--------------------------------------------------------------+
// | When I wrote this, only God and I understood what I was doing
// | Now, God only knows
// +-------------------------------------------------------------*/
//- (void) overlyDifficultMethodToGrasp { ... }
//
私がやりたいことは
/*
/*--------------------------------------------------------------+
| When I wrote this, only God and I understood what I was doing
| Now, God only knows
+-------------------------------------------------------------*/
- (void) overlyDifficultMethodToGrasp { ... }
*/
ご覧のとおり、これは機能しません...
なんで?//
まあ、大きな塊は醜いと思います!