From owner-freebsd-chat@FreeBSD.ORG Thu Apr 16 15:56:18 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 E1191106564A for ; Thu, 16 Apr 2009 15:56:18 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-bw0-f164.google.com (mail-bw0-f164.google.com [209.85.218.164]) by mx1.freebsd.org (Postfix) with ESMTP id 39ABB8FC1B for ; Thu, 16 Apr 2009 15:56:18 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: by bwz8 with SMTP id 8so508448bwz.43 for ; Thu, 16 Apr 2009 08:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=DKLXeRUdEKeOgUyWb0vRjHYnCJhO2T7vRJ3aos8fF50=; b=qzLanw4sYpcaPXRF9RHYPUHQTGXVFbzKCUSHYiSf8Zvg1plL71MybMqGhyXIJ40rqI ImUHYMylX+jP9JzfvVXFKl+8B0Bwn2iMYj3Wt6hnBF0OlztDdrYNCcJIgY9krK1dDxMm UrvZYuEljidYu3C2c/33ugfhY4EykZaqctOEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=SDUgrnIDUCKHj+iyQe+SfgWP4sptLz2Q/JZb2q1K7J51eBeBe4Kf/eH6h0vUHPnxAZ VvP97qma3TBUH1M1EJoa+6YSLUplXywOGJHrOW+4PNByEoZLBzZq6e9eq/lDPyO5HSQZ on+mhRdcXuwN44EXx5l6oQ8PCPoeR/pechclc= Received: by 10.103.224.17 with SMTP id b17mr829559mur.61.1239897377174; Thu, 16 Apr 2009 08:56:17 -0700 (PDT) Received: from ?157.181.96.136? (quark.teteny.elte.hu [157.181.96.136]) by mx.google.com with ESMTPS id y6sm2878305mug.25.2009.04.16.08.56.16 (version=SSLv3 cipher=RC4-MD5); Thu, 16 Apr 2009 08:56:16 -0700 (PDT) Message-ID: <49E75576.8070102@gmail.com> Date: Thu, 16 Apr 2009 17:57:42 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15 MIME-Version: 1.0 To: freebsd-chat@freebsd.org References: <49E2FBE2.8020305@gmail.com> <20090413140912.GC29833@Grumpy.DynDNS.org> <49E51B42.2060405@gmail.com> <320BA0A7-C5E0-40E5-97F9-F19BF1C61B29@hiwaay.net> <49E5670C.8070708@gmail.com> <87bpqytmc7.fsf@kobe.laptop> In-Reply-To: <87bpqytmc7.fsf@kobe.laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 15:56:19 -0000 Giorgos Keramidas wrote: > On Wed, 15 Apr 2009 06:48:12 +0200, deeptech71@gmail.com wrote: >> Could you please give me a (preferrably widely used) example of >> columnizing calls which cross different levels of indentation? > > It's not so uncommon as it may initially seem... > > I've seen switch() cases in several programs indented like this: > > switch (value) { > case SOME_CONSTANT_NAME: do_stuff_here(); break; > case ANOTHER_CONSTANT_NAME: do_some_other_stuff(); break; > default: default_stuff(); break; > } I only see level 1 indentation, not more, not less. Oliver Fromme wrote: > Matthew D. Fuller wrote: > > Only if you abuse tabs for alignment. Indentation is not alignment. > > It's a pity that the two get conflated and everybody ends up treating > > them the same, so that advocating tab indentation is read as > > advocating tab alignment (even by proponents of tab indentation). > > The problem is that many (most? all?) editors cannot easily > be configured to differentiate between them, i.e. insert > literal ASCII tabs characters when the key is pressed > for indentation, and insert ASCII spaces when the key > is pressed for alignment. *And* treat the alignment spaces > transparently like tabs, just like the indentation spaces. > > That's probably not easy to implement, and it gets really > messy when you edit the line, remove or insert stuff between > the alignment spaces and the indetation tabs and so on. > Then suddenly alignment can become indentation, and vice > versa. The editor would then have to transparently convert > existing ASCII tab characters to spaces or vice versa. > This is a huge can of worms. > > 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? So neither should die, rather the people who voluntarity misuse them. [One more time, if there were no spaces, there would be no problems. :)]