[macruby-changes] [3442] MacRuby/trunk/HACKING.rdoc

source_changes at macosforge.org source_changes at macosforge.org
Mon Feb 8 12:49:56 PST 2010


Revision: 3442
          http://trac.macosforge.org/projects/ruby/changeset/3442
Author:   lsansonetti at apple.com
Date:     2010-02-08 12:49:53 -0800 (Mon, 08 Feb 2010)
Log Message:
-----------
added a section about code design

Modified Paths:
--------------
    MacRuby/trunk/HACKING.rdoc

Modified: MacRuby/trunk/HACKING.rdoc
===================================================================
--- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100208/2ec8b739/attachment.html>


More information about the macruby-changes mailing list