[Haskell-i18n] Tabs

Dylan Thurston dpt@math.harvard.edu
Sun, 25 Aug 2002 22:38:02 -0400


On Sun, Aug 25, 2002 at 05:31:21PM -0700, Ashley Yakeley wrote:
> For layout, the language designers probably need to fix the tab width to 
> something, and eight is the standard. So everyone has to use eight when 
> using layout, or else not use tabs. ...

There's an alternative viewpoint I was trying to suggest, but probably
wasn't clear enough: tabs and spaces are incomparable, and it is an
error to try to compare them.  That is, the whitespace at the
beginning of adjacent lines of layout has to be exactly the same, not
just end up at the same goal column.  Similarly, if line 2 is indented
more than line 1, than the whitespace at the beginning of line 2
should start with the identical whitespace to line 1.

This will still sometimes break from the user's point of view, but at
least it breaks immediately and visibly, and would never break
silently.

--Dylan