Revision
3442
Author
lsansonetti@apple.com
Date
2010-02-08 12:49:53 -0800 (Mon, 08 Feb 2010)

Log Message

added a section about code design

Modified Paths

Diff

Modified: MacRuby/trunk/HACKING.rdoc (3441 => 3442)


--- MacRuby/trunk/HACKING.rdoc	2010-02-08 09:10:54 UTC (rev 3441)
+++ MacRuby/trunk/HACKING.rdoc	2010-02-08 20:49:53 UTC (rev 3442)
@@ -92,6 +92,20 @@
         do_something3();
     }
 
+=== Code Design
+
+* Please declare variables as you use them. The whole project is built under the
+  C99 mode so newer constructs are also recommended (such as the definition of
+  iterator variables in 'for' loops).
+
+* Please use the 'const' qualifier for scalar variables that are not supposed to
+  change.
+
+* Use 'assert' or 'abort' for situations that should never happen. It is not a
+  problem if you abuse of this, just be clever.
+
+* Do not use 'alloca' unless you know what you are doing.
+
 === Debugging
 
 ==== Environment variables