comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Ada standard and maximum line lengths
Date: Tue, 29 Jan 2013 18:51:52 +0100
Date: 2013-01-29T18:51:53+01:00	[thread overview]
Message-ID: <51080c38$0$6561$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <amqdeeF1b3qU1@mid.individual.net>

On 29.01.13 17:58, Niklas Holsti wrote:
> On 13-01-29 17:29 , Georg Bauhaus wrote:
>> On 29.01.13 13:31, Niklas Holsti wrote:
>>> Even for hypothetical SW of some sort that generates Ada source code
>>> automatically, I think it very unlikely that it would generate
>>> identifiers of that length, since Ada identifiers can be qualified and
>>> sorted into packages etc. much more flexibly than is the case for linker
>>> symbols.
>>
>> GNAT writes similar identifiers into object files, and
>> the same hysterical raisins spoil the cake. At least the
>> names---those to be exported to other compilers---seem shorter
>> if package hierarchies are not used extensively.
> 
> So what? These are *linker symbols*, not Ada (source) identifiers. I
> don't understand why you bring them into a discussion of source-code
> identifier lengths.

Linker symbols reappear in source text.

Off the island of GCC-only systems, for example. While it might
seem perfectly clear that language L defines a type of specific
objects that have primitive operations, there is no way to express
this in standard Ada. Fallback: linker symbols, function libraries,
and implementation-defined pragmas.

So, linker symbols are two-sided creatures: on the one side, they
are intended for use by linkers; on the other side, they reappear
in source text, even when "just in a pragma" or some such.
And not portably, at that, thereby destroying the value of
standardization of, for example, Ada and C++.

> In many cases, for example for the C++ symbol that you gave, the symbols
> are not even lexically legal Ada identifiers.
> 
>> Alas, the problem of exceedingly long names in object files
>> can be worked around by allowing lengthy identifiers in source
>> text.
> 
> Incomprehensible. Is there a "not" missing somewhere in that sentence?

By the response above, I need to accept long identifiers in
practice; it is a fact that compilers support the reality
of excessively long identifiers and so these reappear in source
text, because(!) language design is only infrequently responsive
to anything outside the fence; it seems a happy coincidence when
some of the respective teams join to talk about the effects
of the fence. I recall that, just recently, modernization, and
correction, of Ada's Fortran compatibility was considered because
someone took initiative. Just that.

So no, the above sentence is not missing a "not": the lack of
advancement in linking is worked around by allowing terribly
simplistic naming to reappear in source text:

   valid standard C++ program     valid standard Ada program
              |                             |
                              _
                              |  (non-standard pragmas)
                              _
                 /                       \
            compilers A+B            compilers C+E
                 |                       |
                OK                      NOK

The same valid programs, translated on the same platform, can
be rejected because the program needs to imports the long,
non-standard, non-portable names.

So it seems obvious that there is an opportunity for
improvement and modernization of linking by addressing
naming in programs written in Ada, C++, and practically
related languages. We have type theory. We have objects.
What we don't have is types at the object code level
("object code. Ha!"). But could we?

Hence, what will a .o/.obj files look like if both C++ and
Ada wanted to let programmers write "normal length" identifiers
for cross-language types, say?

Going back to my initial question. Suppose linker symbols
were structured. Won't the rather technical need for allowing
long identifiers in Ada source text just vanish?




  reply	other threads:[~2013-01-29 17:51 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 [this message]
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
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