AW: Editor Tab Expansion

Markus.Schnell@infineon.com Markus.Schnell@infineon.com
Fri, 6 Dec 2002 12:57:20 +0100


When I got somebody else's C-Code, I used gnu indent to bring
it into a layout I liked (and could easily grasp).

One of the points I like about Haskell is just its use of
space: it makes things clearer and doesn't clutter up your screen
as it does in C. I definitely had less problems with layout in
Haskell than with forgetting braces in C (and line them up nicely).

> unambiguous one using spaces) . I think it's really the fault of ASCII for
> allowing the tab character code which has user-defined semantics, just
> like the other abomination the form-feed character.

That's because of its history: ASCII was used first for telegraphs,
so TAB was just a shorter way of saying "make some space", same with
form-feed, the bell, and all those other characters from 0-31 you
never use.

If somebody wants to write his/her Haskell code with braces, so be it -
unless you develop in a group, then you should have layout rules anyway.
Perhaps somebody could come up with a "Haskell indent" (part of a pretty
printer?)?

Markus