[erlang-questions] Semaphores

Vance Shipley <>
Thu Mar 15 20:36:20 CET 2007


On Thu, Mar 15, 2007 at 07:10:52PM +1300, ok wrote:
}  Source files should be kept to a maximum width of 80 columns;

A number of years ago I would have whole heartedly agreed
but no longer.  A few years ago I did a project which used
ASN.1 and it ended up having really long names which I did
not have the luxury of choosing.  It became impractical to 
use 80 column pages.  I did all my work in 132 column windows 
for that project.  I now find I really prefer working that 
way as I have plenty of glass these days.  I wouldn't however
unecessarily force others into it.

}  Source code should be indented using your text editor's indentation
}  features, NOT one tab per tab stop.  8-column indentations (what you
}  get when you use the tab key) are eye-jarring.
  
That is just wrong.  First of all tabs are whatever your tabstops
are currently set to.  I write all my code using tabs for indentation
the beauty of which is that you can easily change the appearance to
your personal taste (i.e. in vi: set ts=3).  When you find the level 
of indentation is causing line wrapping just make the tabs a few less
characters.  My biggest complaint about emacs is it's quirky idea of
indentation mixing tabs and spaces.  I have never trusted an editor
to decide when to indent 'cause we never agree all the time.

But again it's a project by project decision.  If I submit patches
to the OTP group they will be coded with their style (quirky indentation
and all).

	-Vance



More information about the erlang-questions mailing list