[Haskell-cafe] Re: Is 78 characters still a good option? Was: breaking too long lines

Maurí­cio briqueabraque at yahoo.com
Wed Apr 22 21:28:38 EDT 2009

>>> P.S.  We really need such a well written style guide for
>>>      haskell.  Python has this nice PEP (Python Enhancement
>>>      Proposals).  Should we start making our own HEP?
>> We have one: urchin.earth.li/~ian/style/haskell.html
> Yes, it's good. We should publicise it more.

Just a tought: I would like to see a guide talking about the
code itself, not about the presentation. Maybe this is ignored
because it's difficult. It's easy to get bad code and make sure
it follows strict layout, doesn't resemble imperative code and
has comments on all functions. It's still bad code.

Good practice, I believe, is more like thinking about every
side of your code: how can I change this so that the reader
will be guided as naturally as possible to understand the way it
works? Maybe prose writers or musicians have something to teach
us: how to present characters, how to organize ideas, how not
to confuse the reader, how to avoid showing something before the
reader has the proper background. Also, when to break the rules,
remove clever things that do not fit in the whole, pretend to
ignore the theory when it confuses instead of helping.

The cons: If we do it well, it makes our code to be
undervalued. If you take two months to make a complicated
thing look simple, all you can claim is that you wrote a simple
program :)


More information about the Haskell-Cafe mailing list