comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Visibility problems with package instantiations.....
Date: Fri, 5 Dec 2003 14:52:38 -0600
Date: 2003-12-05T14:52:38-06:00	[thread overview]
Message-ID: <vt1s3e2tg6hra2@corp.supernews.com> (raw)
In-Reply-To: Pine.LNX.4.44.0312051409310.14199-100000@aix.act-europe.fr

"Arnaud Charlet" <charlet@gnat.com> wrote in message
news:Pine.LNX.4.44.0312051409310.14199-100000@aix.act-europe.fr...
> > Note that it is incorrect to assume that only GNAT has this limitation.
>
> And it is also incorrect to assume or state that GNAT has this
> limitation, since this is wrong.
>
> If GNAT (or any Ada compiler for that matter) had this limitation, it
> would not be able to compile ACATS tests which contain several units per
> file.
>
> What people meant is that the optimal, recommended and typical use of
> GNAT is to have one unit per file.
>
> For multiple units per file, GNAT comes with gnatchop which is fully
> capable of handling multiple units.

What I said is that GNAT follows the *letter* of the standard, not the
*spirit*. If you have to do something that the compiler and/or make tool
does not recognize and do automatically if needed, then it doesn't really
support it in my book. That's because you can't edit the source file with
the multiple units and use the make tool to update your program. That means
that you either modify the split files (at which point you no longer have
multiple units in your file), or you have to rememeber to run gnatchop by
hand (and the failure to do so means a lot of wasted time figuring out why
something doesn't work - something I've spent a lot of time doing with
Claw).

Given that supporting this properly would only a few days of work
(implementing it in Janus/Ada took precisely one day, and that was a lot
more complex than integrating gnatchop would be), it is hard to imagine
precisely why that was never done.

Someone mentioned Apex as not supporting multiple files. I believe that in
fact it does work if you use the command line compiler (it doesn't enforce
source naming requirements). And if you just use the GUI, the source code is
pretty much a useless appendage used only to communicate to non-Apex
programs. Even so, it is fair to say that it too has a limitation in this
area.

                        Randy.






  reply	other threads:[~2003-12-05 20:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-27 15:42 Visibility problems with package instantiations Petter Fryklund
2003-11-27 16:33 ` Dmitry A. Kazakov
2003-11-28 11:23   ` Petter Fryklund
2003-11-28 13:17     ` Dmitry A. Kazakov
2003-12-01  7:45       ` Petter Fryklund
2003-12-01  8:58         ` Dmitry A. Kazakov
2003-12-01 16:31           ` Stephen Leake
2003-12-02  9:00             ` Dmitry A. Kazakov
2003-12-02 16:20               ` Stephen Leake
2003-12-03  8:37                 ` Dmitry A. Kazakov
2003-12-03 18:09                   ` Stephen Leake
2003-12-04  9:16                     ` Dmitry A. Kazakov
2003-12-04 13:09                       ` Stephen Leake
2003-12-04 14:03                         ` Dmitry A. Kazakov
2003-12-04 19:24                         ` Randy Brukardt
2003-12-05  0:30                           ` Stephen Leake
2003-12-05  2:58                             ` Randy Brukardt
2003-12-05 14:04                               ` Stephen Leake
2003-12-05 12:14                           ` Jeff C,
2003-12-05 13:13                             ` Arnaud Charlet
2003-12-05 20:52                               ` Randy Brukardt [this message]
2003-12-05 21:10                                 ` Simon Wright
2003-12-02 17:07               ` Jeffrey Carter
2003-12-03  8:49                 ` Dmitry A. Kazakov
2003-12-02  4:25         ` Randy Brukardt
replies disabled

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