-------------------------------------------------- Summary -------------------------------------------------- As we all know python allows us to use either tabs or spaces but NEVER both in the same source file. And as we also know the python style guide says we should use four spaces and refrain from using tabs at all costs. Up until now i have blindly followed this pronouncement form our leader.
-------------------------------------------------- Realization: A splinter in my mind -------------------------------------------------- However lately i have begun to question this convention. Not only the idea of spaces over tabs, but also the idea of allowing both types of indention in a language simultaneously. The latter of which greatly reflects Guido's lack to remove multiplicity from this language. I believe he included both due more to emotion than logic. -------------------------------------------------- Evidence: Tabs ARE superior! -------------------------------------------------- I have begun to believe that tabs are far more superior to spaces, and there are many undeniable facts that support this belief that "tabs only" was the correct and ONLY choice: 1) Using only one indention token removes any chance of user error. Unlike many syntactical errors, indention is invisible in a text/ source editor. Sure there are tools that can make indention visible, however why do we constantly create asinine rules that force us to use complicated tools when we could have choose tabs and none of this would have been a problem? Another big issue with allowing two types (and not allowing them to be mixed) is the huge confusion that beginner get when they see a "inconsistent indentation" error. They had no idea that creating a file with notepad and then editing it with IDLE would case the source to blow up. We should have never had these problems arise because we should have never allowed spaces for indention. 2) Tabs create unity in the source code base. When we use "tabs only" we create a code base that promotes unity and not conformity. There shall no longer be "inconsistent indentation errors" due to mixing tabs and spaces. Also we can remove multiplicity from the compiler. The compiler no loger has to consider BOTH tabs AND spaces as valid indention tokens, only tabs. The logic would be much simpler. 3) Tabs create freedom in the form of user controlled indention. Indention width should be a choice of the reader NOT the author. We should never "code in" indention width; but that is EXACTLY what we are doing with spaces! No, the reader should be able to choose the indention width without ANY formatting required or without any collateral damage to the source code. Tabs offer freedom, spaces offer oppression. 4) Tabs remove the need for complicated indention/detention tools. With "tabs only" you no longer need those fancy tools to indent or de- dent after a tab or backspace key-press. THAT IS EXACTLY WHY TABS WHERE INVENTED! Why are we not using this technology? Why are we continuing to promote spaces when tabs are obviously more superior? -------------------------------------------------- Conclusion: There IS freedom in unity! -------------------------------------------------- When you can create a mandate that brings both UNITY and FREEDOM to your community you know you made the correct choice! Tabs are both unity and freedom at the same time because tabs UNIFY the code base whist giving FREEDOM to view source in any indentation with WITHOUT extra formatting required. Source code must follow rules. And source code authors must follow these rule. Anyone who claims that syntactical rules in a programming language are evil because these rules "somehow" quell freedom is just a complete nut job. Programming languages MUST have rules or ambiguities will run a muck and bring the entire system crashing down. Some would argue that allowing both tabs and spaces is freedom, however this line of reasoning is flawed. Allowing a programmer to format his code in way he pleases is bad, bad, bad. As a member of a community we must all format our code in the same manner. We are each responsible for the community as a whole and as such much follow some rules. Would it be wise for folks to choose which side of the road to drive on? Would it be wise for folks to choose which red lights to stop at (or not stop at)? Would it be wise to allow people to kill other people in the name of freedom? If we continue along this flawed line of reasoning then one could extrapolate just about any excuse for any action under the guise of personal freedom. These people are selfish by nature and they don't care about their own responsibilities to a greater community. They exist only to please themselves. We (as a community) should not care what they think until they decide to stop being selfish. We should never create languages that cater to the selfish. Our rules must take in consideration the "good of the many", and NEVER "the good of the few". We should ALWAYS give our community freedoms; but only the freedoms that foster unity! Tabs meet both criteria and as such should be Pythons only token for indention formatting. -- http://mail.python.org/mailman/listinfo/python-list