Revision: 3442 http://trac.macosforge.org/projects/ruby/changeset/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: -------------- 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
participants (1)
-
source_changes@macosforge.org