From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8143b93889fe9472 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.93.134 with SMTP id cu6mr2300196wib.5.1359624628796; Thu, 31 Jan 2013 01:30:28 -0800 (PST) Path: bp2ni7624wib.1!nntp.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada standard and maximum line lengths Date: Thu, 31 Jan 2013 11:30:27 +0200 Organization: Tidorum Ltd Message-ID: References: <8dfcf819-e1d0-4578-a795-a4bf724b5014@googlegroups.com> <5107b329$0$6556$9b4e6d93@newsspool4.arcor-online.net> <5107eaed$0$6566$9b4e6d93@newsspool4.arcor-online.net> <51080c38$0$6561$9b4e6d93@newsspool4.arcor-online.net> <51085776$0$6637$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 X-Trace: individual.net TXdkzVRTTrV2SehHel9roANj3QuOqZDGY1iZpW7b9o9upmgkz7Ujsvisev6BoKmhxC Cancel-Lock: sha1:+7yHEGa7OaqTY2NigPxfGIkZw6Y= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Date: 2013-01-31T11:30:27+02:00 List-Id: On 13-01-31 11:10 , Stefan.Lucks@uni-weimar.de wrote: > In any case, nobody should need line lengths of more than about 200 > characters. This is not a technological limit, this is related to human > vision. The typical line length (about 80 characters) has been chosen to > be well-readable by humans. (Actually, most people consider this a bit > too large ... but let us stick with "about 80" for the sake of the > argument.) [snip] > The only reason to support longer lines would be to handle automatically > generated code, that is *not* meant to be human-readable. In fact, > writing tools to generate source code is (slightly) easier if one does > not need to care about line ends at all, writing a source file into a > single line ... "Slightly" is right. It is very simple to make the source-code generator insert newlines between lexical elements to keep lines from growing unreasonably long. In practice, when one is developing a program that generates source-code (in Ada or other languages), it is often necessary to look at the output to check that it is correct, or to understand why it is wrong, and this is much easier if the output is not only broken into lines, but also indented in the usual way. A pretty-printer post-processor could be used to format single-long-line output, but this raises the questions of how long input lines the pretty-printer can handle, and whether it can handle syntactically or lexically illegal or incomplete input. Also, if the source-code generator itself does the indenting, incorrect indentation can be a good clue for finding errors in the generator, in my experience. So, developing a working automatic source-code generator is easier if the generator produces code that is nicely broken into lines and nicely indented. Generating a single long line is not the best way, unless the output must be as short as possible (avoiding consecutive spaces or tabs for indentation). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .