[Haskell-cafe] Coding conventions for Haskell?

Donn Cave donn at avvanta.com
Mon Sep 27 22:49:20 EDT 2010

Quoth Brandon S Allbery KF8NH <allbery at ece.cmu.edu>,
> They line up fine in a fixed width font.  Programming in any
> indentation-sensitive language in a proportional font leads inevitably to
> use of tabs to make things line up properly, which leads directly to pain.

I haven't noticed urgent problems with indentation, per se.  I'm not
programming in proportional fonts, but of course when I look at this
stuff here it's email, not a programming editor, and the fonts are
proportional.  Maybe I'm lucky with the fonts on my platform, but the
indentation is fine.  All I expect is that indentation levels compare
correctly to themselves:  i.e., any two lines indented to the same
level are indented the same distance and indented to different levels
they are indented an appropriately lesser or greater distance.

(That's slightly less rigorous than Haskell's layout requires, though,
isn't it?  I'm not sure.  If it does, anyway my personal coding style
is not to depend on alignment for structure, but only relative

The present problem involves alignments that are superfluous to
Haskell's indentation requirement.  Vertical alignment past the
indentation does indeed dictate use of fixed width fonts, for editor
and all display media.  Not nearly worth it in my opinion, but
obviously some would disagree.


More information about the Haskell-Cafe mailing list