« Return to Thread: Good Haskell Style

Re: Good Haskell Style

by Malcolm Wallace :: Rate this Message:

Reply to Author | View in Thread

> * 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
_______________________________________________
Libraries mailing list
Libraries@...
http://www.haskell.org/mailman/listinfo/libraries

 « Return to Thread: Good Haskell Style