[Tutor] tabs or spaces (the endless debate!)

alan.gauld@bt.com alan.gauld@bt.com
Mon Feb 17 08:38:03 2003


> > Because if you write your code to wrap at 79 chars (which is a good
> > idea for readability) 
> In my opinion, this is more a legacy problem. On all the major
> platforms we have editors that can display long lines using scroll
> bars or methods of scrolling. This isn't vi on vt220 any more :^)

Unfortunately AS/400 and MVS users are still stuck with 80 character 
displays... In fact when I telnet into my Unix server at work I get 
a VT220 terminal window. However that's only one aspect, there's also 
the issue of printing out the listing which on my printer at work 
defaults to 80 chars wide too.

Finally there's the human comprehension thing. When you get very long 
lines it's hard to scan the whole line. While 80 is maybe shorter than 
necessary I'd certainly draw the line at 132 (the other setting on 
my VT220 :-)

> So? It's purely cosmetic. The content remains true.

Yes, but cosmetic is important for comprehensibility

> Anyway, I don't think there's a single "right" answer to this
> question. I have always used real tabs up until now, but I'm trying
> spaces on my latest project just for comparison. :^)

There's no definitive answer because Python is happy with either.
Using spaces you will probably settle on smaller indents, but you'll 
get used to reading that pretty quickly IME.

Alan G