From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: Source code formatting: line length limit? Date: Sun, 26 Jan 2003 13:12:52 +0000 (UTC) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <84ptqlflp7.fsf@lucy.is.informatik.uni-duisburg.de> <200301260121.h0Q1LXx18015@rum.cs.yale.edu> Reply-To: bob@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043586838 4270 80.91.224.249 (26 Jan 2003 13:13:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 26 Jan 2003 13:13:58 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18cmbl-00016k-00 for ; Sun, 26 Jan 2003 14:13:57 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18cmfT-0007TN-00 for ; Sun, 26 Jan 2003 14:17:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18cmci-00064w-01 for emacs-devel@quimby.gnus.org; Sun, 26 Jan 2003 08:14:56 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18cmcM-00060x-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 08:14:34 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18cmcI-0005wg-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 08:14:33 -0500 Original-Received: from megalith.rattlesnake.com ([140.186.114.245] helo=localhost) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18cmak-0004hL-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 08:12:55 -0500 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.114) Sun, 26 Jan 2003 13:12:52 +0000 (UTC) Original-To: emacs-devel@gnu.org In-reply-to: <200301260121.h0Q1LXx18015@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11079 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11079 I wrote: > .... A fill-column of 70 works well with the usual > between-line spacing on a computer screen. "Stefan Monnier" responds Note that in source code, most lines don't start in column 0, so for a given line, the number of columns of text is not necessarily the same as the column of the rightmost char. I happen to think that 60 columns is more legible, ... Yes. In some ways, 60 is better; it is even harder to swing your eyes down when the lines do not start in the left most column. However, one advantage of a wider line is that more information is put on the line. Programming expressions are ways of stating complex notions in a manner than a human can comprehend. It is easier to understand and bear in mind a notion laid out in one line than spread out over two or three. A key characteristic of programming languages designed for programmers, such as C or Lisp, is that they are succinct. On the other hand, excessive width does reduce the compactness of a notation as much as excessive depth, so a line cannot be overly long. (Excessive succinctness creates another problem; many programmers find it hard to comprehend a expression that is `too concise', for some fuzzy definition of `too concise'. A popular programming language must be a balance between `too concise' and `too wordy'.) .... but I also think that in most cases, source code that spans 80 columns is perfectly legible because almost none of the lines actually takes more than 60 columns of text. ... Also the non-constant indentation of the code also helps your eyes find the next line. Indentation helps, but large areas of blank space on the left give difficulty to me nonetheless. And since I find vertical screen-real-estate to be at a premium, I advocate using all 80 columns for code (text is obviously another matter). An 80 column text looks terrible when patched or quoted so as to be wider, but still shown on an 80 column window. Consequently, an 80 column width will discourage some from quoting or patching your code, since he or she will have to pretty print it before working on it. -- Robert J. Chassell Rattlesnake Enterprises http://www.rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.teak.cc bob@gnu.org