Good Haskell Style
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed Aug 1 13:59:25 EDT 2007
> * Don't leave trailing white space in your code
> * Don't use tabs
> * Aim to keep lines under 80 characters
> * Use the CamelCase variable naming convention
> * Don't use explicit braces and semicolons
These rules seem reasonable to me, but I would finesse the second point.
Whilst tabs are undesirable in code, I do often find it useful to
precede _eol_ comments with tabs.
"function | guard = body\t\t-- eol comment"
Tabs help to align the beginning of such comments nicely; they help to
avoid random misalignments due to minor editing of code; and in this
location they can never change the meaning of the code.
Regards,
Malcolm
More information about the Libraries
mailing list