From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13813 invoked from network); 5 Mar 2021 00:55:55 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 5 Mar 2021 00:55:55 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 2392B9CA89; Fri, 5 Mar 2021 10:55:53 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0902E9CA68; Fri, 5 Mar 2021 10:55:36 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 25AE69CA68; Fri, 5 Mar 2021 10:55:33 +1000 (AEST) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) by minnie.tuhs.org (Postfix) with ESMTPS id 77ACF9CA67 for ; Fri, 5 Mar 2021 10:55:32 +1000 (AEST) Received: by mcvoy.com (Postfix, from userid 3546) id D5E4F35E1AF; Thu, 4 Mar 2021 16:55:31 -0800 (PST) Date: Thu, 4 Mar 2021 16:55:31 -0800 From: Larry McVoy To: John Cowan Message-ID: <20210305005531.GA30608@mcvoy.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [TUHS] tabs vs spaces - entab, detab X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Thu, Mar 04, 2021 at 07:44:12PM -0500, John Cowan wrote: > On Thu, Mar 4, 2021 at 2:10 PM emanuel stiebler wrote: > > Does it help, if we differentiate with the type of text ? > > > > Assembler : Tabs = 8 spaces > > (c, c++, pascal, java, etc.) : tabs = 4 spaces > > > > The Lisp community long ago standardized on 2-space indentation. I used to be a 4 spaces are tabs guy but Sun beat that out of me. Tabs are tabs and they are for a reason, though that reason is pretty dead. The reason was pretty printing listings, anything but tabs got all screwed up. But it has probably been a decade or more since I've pretty printed anything, maybe two. Old habits... I developed my own use of 4 spaces, those are "continuation lines" if (some_stupidly_long_expression_that_goes_on_forever >= this_never_happens_but_it_does_happen_when_deeply_nested) { statement; statement2; etc; } But I'm weird, I hate if (expr) statement; I do if (expr) statement; Curly braces are for more than one statement or I do do if (expr) { statement; } else { statement2; } I also like perl so I do #define unless(x) if (!(x)) because I think this reads better: FILE *f; unless (f = fopen(argv[1], "r")) { perror(argv[1]); exit(1); }