Update of /var/cvs/documentation/backenddevelopers
In directory james.mmbase.org:/tmp/cvs-serv27589

Modified Files:
        codingstandards.xml 
Log Message:
Add a not about line lengths, and elaborated a bit on the tab length issue


See also: http://cvs.mmbase.org/viewcvs/documentation/backenddevelopers


Index: codingstandards.xml
===================================================================
RCS file: /var/cvs/documentation/backenddevelopers/codingstandards.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- codingstandards.xml 25 Feb 2007 22:01:15 -0000      1.11
+++ codingstandards.xml 27 Aug 2008 07:18:26 -0000      1.12
@@ -5,7 +5,7 @@
   <articleinfo>
     <title>Summary of Coding Standards</title>
     <date>2003-02-14</date>
-    <edition>$Id: codingstandards.xml,v 1.11 2007/02/25 22:01:15 michiel Exp 
$</edition>
+    <edition>$Id: codingstandards.xml,v 1.12 2008/08/27 07:18:26 michiel Exp 
$</edition>
     <authorgroup>
       <author>
         <firstname>Pierre</firstname>
@@ -198,8 +198,15 @@
     <itemizedlist>
       <listitem>
         <simpara>Indentation is four spaces for each block. Do not use 
tabs.</simpara>
-        <simpara>This deviates from some standards, there are differences in 
how people use tabs or how editors show them. The alternate would be to
-        use ONLY tabs (which is not likely to work).</simpara>
+        <simpara>This deviates from some standards, there are differences in 
how people use tabs or
+        how editors show them. The alternative would have been to use ONLY 
tabs, but this conflicts
+        with the java code conventions of SUN, which tells us to indent with 
units of 4 spaces and
+        have a tab width of 8. So a tab can only replace 
<emphasis>two</emphasis> indents. So
+        because the logical tab width is 4 and the required tab width is 8. 
This made us choose to
+        require to not use tabs at all, this is compatible with both the 
logical and the required
+        choice of tab-width, while not incompatible with the SUN code 
conventions because those
+        <emphasis>don't</emphasis> say that you have to use tabs. We simply 
add to these conventions
+        that you have to <emphasis>not use tabs</emphasis></simpara>
       </listitem>
       <listitem>
         <simpara>A keyword followed by a parenthesis should be separated by a 
space (i.e. if (...))</simpara>
@@ -213,6 +220,12 @@
       <listitem>
         <simpara>All binary operators should be separated by spaces.</simpara>
       </listitem>
+      <listitem>
+       <simpara>The Code Conventions for the JavaTM Programming Language tells 
us to avoid lines
+       longer than 80 characters. You could do that, but since it is the 21th 
century, probably not
+       many people are using such small terminals. You could instruct your 
editor to wrap at 100
+       characters or so too.</simpara>
+      </listitem>
     </itemizedlist>
   </section>
   <section id="other_style_conventions">
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to