[Tutor] tabs or spaces (the endless debate!)
Erik Price
erikprice@mac.com
Sat Feb 15 23:34:02 2003
On Saturday, February 15, 2003, at 04:19 PM, R. Alan Monroe wrote:
>> Because if you write your code to wrap at 79 chars (which is a good
>> idea for readability) then whether a tab is 4 or 8 chars matters (and
>
> 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 :^)
So when you print your code, you print it in landscape orientation on
11"x17" paper?
I'm pretty sure it is a violation of most coding standards (including
the Guido recommendation I linked to earlier) to exceed 80 characters
per line, regardless of what your editor is capable of doing. Feel
free to do it with your own stuff, but shared code should take into
account many different viewing formats (and yes I do occasionally read
code in 80 char-columned term windows).
> So? It's purely cosmetic. The content remains true.
Hmm... if code formatting was purely cosmetic then I doubt that that
Python would have been designed to require a specific
whitespace-sensitive formatting. There's more to code formatting than
meets the eye. :)
> 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. :^)
I agree with you, there is no universal answer, the only "right" answer
would be the one in the code style guide you or your team is using.
Erik
--
Erik Price
email: erikprice@mac.com
jabber: erikprice@jabber.org