TABS in the CPython C source code

Alf P. Steinbach alfps at start.no
Sun Feb 7 01:26:00 EST 2010


* Nobody:
> On Sat, 06 Feb 2010 21:31:52 +0100, Alf P. Steinbach wrote:
> 
>> The size-8 tabs look really bad in an editor configured with tab size 4,
>> as is common in Windows. I'm concluding that the CPython programmers
>> configure their Visual Studio's to *nix convention.
> 
> 8-column tabs aren't a "*nix convention"; that's been the norm since
> the mechanical typewriter.
> 
> Historically, software and hardware which knows what a "tab" could be
> split into two categories:
> 
> 1. Tab stops are fixed at 8-column intervals.
> 2. Tab stops default to 8-column intervals but can be changed.
> 
> Recently, a third category has appeared (tab stops default to something
> other than 8 columns).

I'm sorry, but you have your history wrong.

Tab stops originated with mechanical typewriters, and then printers. They could 
be just about anything.

Tab stops have never been universally 8 columns  --  so unless by "recent" 
introduction of other sizes you mean 1958 or thereabouts, you're completely off 
track.


> The most common example is Visual Studio. No
> surprise there: Microsoft has a track record of introducing slight
> incompatibilities into established standards. Just enough to inconvenience
> anyone using competing products, but not so much that anyone operating
> in a context where Microsoft isn't dominant has to abandon Microsoft's
> product.
> 
> Given that:
> 
> 1. 8-column tabs have been the standard for longer than most of us
> have been alive, let alone programming, and

I'm sorry, that's incorrect, it's never been standard.


> 2. even if a particular text editor supports some other value, there is no
> way to communicate this fact to anything else which might read the code,

If you add the word "portable" and remove the word "other" and replace 
"supports" with "is configured to use" then that's sort of technically correct. 
But I agree with the general sense. And I think most everyone does. A common 
convention would have been nice. But we don't have that.


> the logical conclusion is that using anything other than 8 columns lies
> somewhere between "silly" and "assuming the world revolves around you".

«the logical conclusion is that assuming 8 column tab stops lies somewhere 
between "silly" and "assuming the world revolves around you"» :-)

In particular, consider Windows programming.


Cheers & hth.,

- Alf



More information about the Python-list mailing list