From owner-freebsd-chat@FreeBSD.ORG Thu Apr 16 17:24:52 2009 Return-Path: Delivered-To: freebsd-chat@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EBF4106564A for ; Thu, 16 Apr 2009 17:24:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id D31628FC1E for ; Thu, 16 Apr 2009 17:24:51 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n3GHORuN028761; Thu, 16 Apr 2009 19:24:50 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n3GHORu4028760; Thu, 16 Apr 2009 19:24:27 +0200 (CEST) (envelope-from olli) Date: Thu, 16 Apr 2009 19:24:27 +0200 (CEST) Message-Id: <200904161724.n3GHORu4028760@lurza.secnetix.de> From: Oliver Fromme To: freebsd-chat@FreeBSD.ORG In-Reply-To: <49E75576.8070102@gmail.com> X-Newsgroups: list.freebsd-chat User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 16 Apr 2009 19:24:50 +0200 (CEST) Cc: Subject: Re: My whitespace style X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2009 17:24:52 -0000 deeptech71@gmail.com wrote: > Oliver Fromme wrote: > > [...] > > That's another good reason to let the old ASCII tab die and > > rest in peace (or "lost in space" ... ok, bad pun). > > In this and other posts you only give reason to kill off the space, not > the tab. If two things conflict, which is wrong is for me to decide, not > you. :) Seriously, let's devise a reason why one should die. > > Yes, it's hard to implement an editor which controls retarded mixes of > tabs and spaces. But generally it's hard to implement an editor which > controls retarded of any ASCII character. So let's only consider > "well-formed" files. For such files, my whitespace style applies: if > indentation is width-critical, use spaces, otherwise (like C source) use > tabs precisely for indentation. What do you want from not well-formed files? A space is a well-defined thing. It behaves like any other printing ASCII character (it is not a control character). A tab character (ASCII 9) is not well defined. Its behaviour depends on the editor and its configuration, on the user's preferences, on the terminal's capabilities, and so on. What's worse, the behaviour of tabs can change in undesirable ways when you move them from one environment to another. For example, when you put source code with tabs on a web page, it depends on the browser how it will be displayed, and it's even possible that some browsers don't display the source code correctly at all. The same when sending source code through e-mail or usenet news: the appearance depends on the client. Given the plethora of clients, chances are that some of them will display the tabbed source code in incomprehensible ways. That's not a bug in the clients, because there is no standard for the correct rendering of tab characters. And it get's even worse when you try to copy&paste such source code, you will often lose all tabs. That's why I believe that the only control character that should belong in source code is the line terminator. Note that even this is not really standardized: There's the newline character (line feed, ASCII 10), the carriage return character (ASCII 13) and combinations thereof, and more. But it's fairly simple to convert between those, there is no ambiguity, and editors usually handle it very well. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "A misleading benchmark test can accomplish in minutes what years of good engineering can never do." -- Dilbert (2009-03-02)