[Haskell-i18n] Unicode in source

Glynn Clements glynn.clements@virgin.net
Sat, 24 Aug 2002 03:47:08 +0100


Ashley Yakeley wrote:

> > Pedantry aside, I agree with your presumed meaning. The magic numbe=
r
> > is 8. If anyone wishes to believe otherwise, then fine; so long as
> > they don't expect the rest of the world to share their delusion.
>=20
> Feh. There ought to be a "tabwidth" parameter for MIME text/plain,=20=

> however as far as I know there isn't.

"Things" (hardware or software) which assign a width to tab characters
fall into two categories:

1. those which always have tab stops at 8-column intervals, and

2. those which default to having tab stops at 8-column intervals, but
allow the setting to be changed by some means.

I'm pretty sure that there isn't a third category; in 24 years of
using computers, I don't recall ever encountering anything for which a
value other than 8 was either the default setting or the only setting.

> If you want to look at my source properly, you'll have to set it to 4=
. My=20
> code, my choice.

=A7B.3 of the Haskell98 report says:

  To determine the column number, assume a fixed-width font with this
  tab convention: tab stops are 8 characters apart, and a tab
  character causes the insertion of enough spaces to align the current
  position with the next tab stop.

If you want your code to compile properly, it will have to "look"
right to a compiler which has tab stops every eight columns.

Of course, if you don't use tabs, or if you always insert line breaks
and don't mix tabs and spaces, it should both look right and compile
regardless of how tabs are interpreted.

--=20
Glynn Clements <glynn.clements@virgin.net>