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: a07f3367d7,8143b93889fe9472 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.86.166 with SMTP id q6mr1786929paz.44.1359688882639; Thu, 31 Jan 2013 19:21:22 -0800 (PST) Path: 6ni28717pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!news.snarked.org!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!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: Mon, 28 Jan 2013 22:22:37 +0200 Organization: Tidorum Ltd Message-ID: References: <8dfcf819-e1d0-4578-a795-a4bf724b5014@googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net pVY5OGIsH8cYTq8bbk+/kQu8mBAVquT6uFGfv7E9iBYX14zWavQUtpUjl4ENqJZrSR Cancel-Lock: sha1:NJMTGtuXr4KXaKRNUwJFYNDrphQ= 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-1 Content-Transfer-Encoding: 7bit Date: 2013-01-28T22:22:37+02:00 List-Id: On 13-01-28 18:42 , Jeffrey Carter wrote: > On 01/28/2013 01:05 AM, Niklas Holsti wrote: >> On 13-01-28 08:28 , Jeffrey Carter wrote: >> >>> But since the maximum line >>> length chosen by a compiler also defines the maximum identifier length >>> accepted by the compiler, >> >> Why? I don't see anything in the ARM quote that requires this. The >> limits on the line length and lexical element length are independent, >> although they minimum happen to have the same minimum value. > > This isn't addressed directly in the quote. An identifier is a sequence > of characters from certain classes, terminated by a delimiter; a line > terminator is a delimiter. In the absence of another restriction on > identifier length, clearly an identifier cannot be longer than the > maximum line length. Agreed. But the maximum length of an identifier can be *shorter* than the maximum length of a line. You wrote, above, that the max line length "defines" the max identifier length. Perhaps you really meant to say that the max line length sets an upper bound on the max identifier length, which is true. >> A compiler could have 200 characters as the maximum lexical element and >> identifier length, but accept lines of any length, couldn't it? > > Presumably it could. I thought efficiency in compiling was the reason > behind limiting identifier length My point is that the compiler's max identifier length can be *less* than its max line length. Even if a limit on identifier length makes a compiler more efficient (which I doubt is a significant factor today, at least if the majority of identifiers are of moderate length), the compiler could still accept lines of any length, much longer than the max identifier length. Returning to the ARM limits, in principle it is necessary to have some safe lower limits on what a compiler must accept, so that one can be sure that some strange compiler will not reject one's Ada program just because it has too long identifiers or lines. In practice, today this portability could probably work as well based on informal "usability" criteria -- clearly an Ada compiler with a maximum identifier length of 10-15 characters (or whatever minimum maximum is imposed by the predefined identifiers) would often annoy its users. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .