I hate you all

Timothy Madden terminatorul at gmail.com
Sat Apr 6 02:56:51 EDT 2013


On 06.04.2013 08:53, Ian Kelly wrote:
> On Fri, Apr 5, 2013 at 11:07 PM, Timothy Madden <terminatorul at gmail.com> wrote:
[...]
> So in other words, everybody must be forced to use 8-character tabs
> because you want to be able to mix tabs and spaces.
>
>> People say I can use tabs all the way, just set them to the indent I want.
>>
>> Well, I always had my indent independent of the tab size. Which is the way
>> it should be, after all, since one can indent with or without tabs, so
>> indent should not be tied to them.
>>
>> But now I can not; python no longer lets me do that.
>
> Honestly, I really don't understand why you *want* to do that.  If
> your indentation is 4 characters, then that would be the natural tab
> width to use.  If you're not going to tie your indent to your tabs,
> then why even use tabs in the first place?
>
>> The new rules may look flexible at first sight, but the net effect they have
>> is they push me to use non-default tab size (which is not good),
>
> What makes that not good?  There is no law anywhere that says tabs are
> 8 characters.  That's just an arbitrary amount that looked appropriate
> to the people designing the first teletypes.

I am aware that 7 bytes per tab character (or 14/28, in UTF-16, UTF-32!) 
will not justify the time spent debating.

The reason I want to use tabs is that I think there is nothing wrong 
with them.

The reason why everybody should use 8-character tabs is so that I and 
the rest of the world can use `grep` / `findstr` on their code, and 
still see lines of code properly aligned in the terminal. Or to be able 
to print fragments of code as plain text only, and get the proper alignment.

But most importantly, the reason that tab size should be 8 is so that 
all of us people in this world can freely exchange formatted text like 
source code without having to first consider if "will it look the same 
in their editor ? What tab size do they use ?"

In other words, the solution to "different people's definition of tabs" 
is not to drop them, but only to get a common default. Which is already 
there: 8 columns between every tab stop.

What python 3 does is a different attitude, and that is:

everyone likes their own indent. Although I personally find it annoying, 
I am aware that many people use an indent of 2 spaces, some use even 3. 
Moreover, many C programers still like 8 spaces per indent.

So some development environments find it an advantage to use tabs only 
for indentation, and every programmer is then free to set the tab stop 
to their liking. Everyone will see the indent they like, with no changes 
in the byte stream for the file.

Why I think this is wrong is a little difficult for me explain. First, I 
admit this approach toward tabs has some value and is tempting for me, 
too. But it assumes everything, everywhere can configure tab sizes. 
Consoles and printers usually do not. Next, even if they can, most 
people, including all non-technical personal, never bother to change 
settings. Then this also assumes I change settings to my liking on 
several computers I use (maybe I work for several clients each with 
their computers, most people have a work computer and a home computer, 
maybe also a laptop and a tablet/smart device). Last, this is also not 
helpful if two sometimes use the same computer from time to time, and do 
not want to switch users all the time.

So this is not a very good approach, and I have the feeling that most 
python programmers and development environment prefer to use only spaces 
than to use variable tab sizes.

So the right solution remains a proper default setting for the tab size, 
and then we no longer have to drop tabs from source code files.

Thank you,
Timothy Madden



More information about the Python-list mailing list