comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Ada standard and maximum line lengths
Date: Wed, 30 Jan 2013 10:28:46 -0500
Date: 2013-01-30T10:28:46-05:00	[thread overview]
Message-ID: <wccfw1iheq9.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: ams6reFdfsdU1@mid.individual.net

Niklas Holsti <niklas.holsti@tidorum.invalid> writes:

> To summarize, I think this thread started by asking why the ARM mentions
> maximum line length at all. The discussion has shown that:
>
> - Ada 83 did not discuss line length or lexical-element length, so
> compilers were in principle obliged to support any length, but perhaps
> many compilers had limits motivated by "capacity limits".

Right.

> - Ada 95 introduced the lower bounds of 200 characters on lines and
> lexical elements. Perhaps they were not meant to be independent, ...

The wording is clear: the two requirements are independent.
That was the intent.  (I wrote those words, although I was opposed
to adding the 200-char requirements.)

>...and the
> ACATS test require the compiler to support identifiers that are as long
> as the longest possible line.

Those tests are wrong, and they were wrong even for Ada 83.
An Ada compiler is allowed to support unlimited line lengths.
The ACATS requires the compiler to have a limit; that's wrong.
It's also wrong to require that the two limits be the same.

By "support unlimited line lengths" I mean no specific limit built into
the compiler.  Of course, there is always SOME limit -- the size of your
disk limits how long a line can be, a (broken) OS might impose a limit,
and if you compile something huge, the compiler might run out of memory.

>...Therefore, in practice compilers use the
> same limit (if any) for both, if I understood Randy correctly.

Yes, they do.

It's not the only time compiler writers have obeyed the ACATS, rather
than disputing incorrect tests.  That could be because it's a big hassle
to dispute tests, and takes a long time, and in this case, it's trivial
to obey the tests.  It could also be because the compiler writer assumed
the test was correct.

> - Janus/Ada has a limit of around 250 characters on identifier length,
> which Randy would find "annoying" to remove.

I think the limit in GNAT is many thousands of characters.
But sources written at AdaCore are limited to 79-character lines.

> - The longest real-life identifier exhibited so far is from the Unicode
> character names and is 73 characters.

I'd prefer not to have such built-in limits.  The fact that I've
never seen an identifier longer than 73 characters doesn't change
my mind.  To argue for a built-in limit of 200 characters, I think
you have to not only argue that "nobody needs lines longer than that",
but also argue that there is some important advantage (efficiency?
simplicity?), which I don't see here.

- Bob



  parent reply	other threads:[~2013-01-30 15:28 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28  5:02 Ada standard and maximum line lengths Lucretia
2013-01-28  6:01 ` J-P. Rosen
2013-01-28  6:28 ` Jeffrey Carter
2013-01-28  8:05   ` Niklas Holsti
2013-01-28 16:42     ` Jeffrey Carter
2013-01-28 20:22       ` Niklas Holsti
2013-01-28 20:46         ` J-P. Rosen
2013-01-28 21:29           ` Niklas Holsti
2013-01-29  1:42             ` Randy Brukardt
2013-01-29  6:15             ` J-P. Rosen
2013-01-29 10:25               ` Niklas Holsti
2013-01-29 11:31                 ` Georg Bauhaus
2013-01-29 12:11                   ` Simon Wright
2013-01-29 12:31                   ` Niklas Holsti
2013-01-29 12:37                     ` Niklas Holsti
2013-01-29 15:29                     ` Georg Bauhaus
2013-01-29 16:58                       ` Niklas Holsti
2013-01-29 17:51                         ` Georg Bauhaus
2013-01-29 18:18                           ` Shark8
2013-01-29 19:54                           ` Niklas Holsti
2013-01-29 23:12                             ` Georg Bauhaus
2013-01-30  9:18                               ` Niklas Holsti
2013-01-30  9:51                                 ` Simon Wright
2013-01-30 15:28                                 ` Robert A Duff [this message]
2013-01-30 23:24                                   ` Randy Brukardt
2013-01-31  2:16                                     ` Robert A Duff
2013-01-31  9:10                                       ` Stefan.Lucks
2013-01-31  9:30                                         ` Niklas Holsti
2013-01-31  9:51                                           ` Simon Wright
2013-01-31 10:56                                           ` Georg Bauhaus
2013-01-31 18:02                                         ` Jeffrey Carter
2013-01-31 23:54                                       ` Randy Brukardt
2013-02-01  9:15                                         ` Niklas Holsti
2013-02-01 23:13                                           ` Randy Brukardt
2013-02-02  1:24                                             ` Lucretia
2013-02-02 14:12                                               ` Robert A Duff
2013-02-05  2:09                                               ` Randy Brukardt
2013-01-31  9:03                                   ` Dmitry A. Kazakov
2013-01-30  9:37                               ` Simon Wright
2013-01-30 12:02                                 ` Georg Bauhaus
2013-01-29 23:47                             ` Jeffrey Carter
2013-01-30  7:24                               ` Niklas Holsti
2013-01-30 10:09                                 ` J-P. Rosen
2013-01-29 20:36                 ` Niklas Holsti
2013-01-29 21:01                   ` Robert A Duff
2013-01-29 21:14                   ` Dmitry A. Kazakov
2013-01-28  8:18 ` Dmitry A. Kazakov
2013-01-28 10:02   ` Maciej Sobczak
2013-01-28 11:57     ` Georg Bauhaus
2013-01-28 13:28       ` Niklas Holsti
2013-01-28 15:14       ` J-P. Rosen
2013-01-28 16:13       ` Dmitry A. Kazakov
2013-01-28 15:13     ` Dmitry A. Kazakov
2013-01-28 13:49 ` Robert A Duff
2013-01-29  2:09   ` Randy Brukardt
2013-01-29 18:46 ` Lucretia
2013-01-29 20:53   ` Robert A Duff
2013-01-29 21:22   ` Dmitry A. Kazakov
2013-01-30  3:22     ` Lucretia
2013-01-30  9:49       ` Dmitry A. Kazakov
2013-01-30 23:28         ` Randy Brukardt
2013-02-01  1:48       ` Shark8
2013-01-29 21:29   ` Dmitry A. Kazakov
2013-01-29 21:53   ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox