
Fri, 23 Aug 2002 10:56:43 -0400, Dylan Thurston
(I'd go further and require that the leading white-space always be identical, not just get you to the same column. Tabs are not always equal to 8 spaces...)
Choosing a non-standard tab width is evil. They should be 8 spaces always and life would be a bit simpler. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/

On Fri, Aug 23, 2002 at 05:51:42PM +0000, Marcin 'Qrczak' Kowalczyk wrote:
Fri, 23 Aug 2002 10:56:43 -0400, Dylan Thurston
pisze: (I'd go further and require that the leading white-space always be identical, not just get you to the same column. Tabs are not always equal to 8 spaces...)
Choosing a non-standard tab width is evil. They should be 8 spaces always and life would be a bit simpler.
I prefer to think of spaces and tabs as independent units. That way there are never any errors of comparison. If you use the equality 8 spaces = 1 tab, then your indentation gets destroyed in, for instance, quoted e-mail messages. WRT Haskell, this has annoyed me in literate scripts using '>'. (I think there was even some difference between Haskell implementations here?) --Dylan

Marcin 'Qrczak' Kowalczyk wrote:
(I'd go further and require that the leading white-space always be identical, not just get you to the same column. Tabs are not always equal to 8 spaces...)
Choosing a non-standard tab width is evil. They should be 8 spaces always and life would be a bit simpler.
Tab stops are *every 8 columns*. The "width" of an individual tab
character is between 1 and 8 columns, depending upon column in which
the tab character occurs.
Pedantry aside, I agree with your presumed meaning. The magic number
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.
I can see the sense in prohibiting mixing of tabs and spaces, even at
the beginning of the line (e.g. due to citation marks in email). OTOH,
I can also see how this is asking for trouble; expect the phrase "but
it looks OK in my editor" to become commonplace.
--
Glynn Clements

Here's what Guido v. R. says about Python: | Indentation | | Use the default of Emacs Python-mode: 4 spaces for one indentation | level. For really old code that you don't want to mess up, you can | continue to use 8-space tabs. Emacs Python-mode auto-detects the | prevailing indentation level used in a file and sets its indentation | parameters accordingly. | | Tabs or Spaces? | | Never mix tabs and spaces. The most popular way of indenting Python | is with spaces only. The second-most popular way is with tabs | only. Code indented with a mixture of tabs and spaces should be | converted to using spaces exclusively. (In Emacs, select the whole | buffer and hit ESC-x untabify.) When invoking the python command | line interpreter with the -t option, it issues warnings about code | that illegally mixes tabs and spaces. When using -tt these warnings | become errors. These options are highly recommended! (from http://www.python.org/doc/essays/styleguide.html) -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (4)
-
Dylan Thurston
-
Glynn Clements
-
ketil@ii.uib.no
-
Marcin 'Qrczak' Kowalczyk