Good Haskell Style

Duncan Coutts duncan.coutts at
Wed Aug 1 16:22:42 EDT 2007

On Wed, 2007-08-01 at 13:06 -0700, Iavor Diatchki wrote:
> Despite the fact that I tend to write code that follows these
> conventions (except for bullet 4), I find the rules to be extremely
> arbitrary and I do not think that they should be given any special
> status.

But isn't that just the nature of a standard?

A good common style helps people communicate and share their code. 

Of course we cannot force a style upon anyone, however many authors
*want* to use a style that many other people use because it will make
their code more accessible. So for their benefit we can try to elevate
some common set of rules and say if you want to follow a style, follow
this one.

Then as a bonus the style that we pick can be somewhat less than totally
arbitrary and have some practical justification like Ian's arguments
about tabs and layout etc.

So the value of this discussion is in trying to find a style that is
sufficiently common or well justified that we can promote it as a
recommended style to exiting and new coders.

> PS: While we are discussing style, what should be the blessed amount
> of indentation ;-)  I vote for 2 spaces.

So do I, but this is probably an even more contentious issue :-).


More information about the Libraries mailing list