[Haskell-cafe] Layout rule (was Re: PrefixMap: code review request)

Cale Gibbard cgibbard at gmail.com
Fri Mar 3 14:15:54 EST 2006

On 28/02/06, Brian Hulley <brianh at metamilk.com> wrote:
> Why? Surely typing one tab is better than having to hit the spacebar 4 (or
> 8) times?
> I'm really puzled here. I've been using tabs to indent my C++ code for at
> least 10 years and don't see the problem. The only problem would be if
> someone mixed tabs with spaces. Since it has to be either tabs only or
> spaces only I'd choose tabs only to save keystrokes. I suppose though it is
> always going to be a matter of personal taste...

It's easy to configure most editors (vim and emacs included of course)
to treat multiple spaces as if they were tabs, but to only save spaces
into your file. This is what I do, as it ensures that the way that the
code looks to me in my editor is exactly what it looks like to the
compiler. Quite often, if it looks better, I will align things past a
tab stop with a few extra spaces (which only has to be done once, if
your editor will start the next line at the same indentation as the

 - Cale

More information about the Haskell-Cafe mailing list