From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: body stub not allowed in inner scope
Date: Sat, 3 Mar 2018 10:42:27 +0100
Date: 2018-03-03T10:42:27+01:00 [thread overview]
Message-ID: <p7dqm4$n74$1@dont-email.me> (raw)
In-Reply-To: <lyefl2i7ja.fsf@pushface.org>
On 02.03.18 20:47, Simon Wright wrote:
> G. B. <nonlegitur@nmhp.invalid> writes:
>
>> Randy Brukardt <randy@rrsoftware.com> wrote:
>>> why put them in a separate file in the first place?
>>
>> Yes, separate units can be placed after the bodies,
>> yet in the same file! Not always my choice but that, too
>> moves dependences out of the superunit.
>> Irrespective of what a compiler can make of this.
>
> This seems a really crazy approach.
>
> Given that Emacs, for example, is quite capable of displaying two
> view of different parts of the same buffer.
Emacs, or any other plain text editor, has no influence
on the semantics of Ada unit dependencies, as that's a matter
of structuring source text. I'd like an Ada compiler to
diagnose that a dependency can be moved to a subunit refactored
from some coherent part of a body, say. GNAT does this for
with-clauses that can be moved to the body.
-- -*- page-delimiter: "^\\(package\\|separate\\)" -*-
package body P is
procedure P1;
procedure P2;
procedure P3;
procedure P4;
X : T;
procedure P1 is null;
procedure P2 is null;
procedure P3 is null;
procedure P4 is separate;
end P;
with Subsystem.Load;
separate (P)
procedure P4 is
use Subsystem;
begin
if Whatever (X) then
X.Op_15;
Load.Get_Going (X);
end if;
end P4;
next prev parent reply other threads:[~2018-03-03 9:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 13:01 body stub not allowed in inner scope Mehdi Saada
2018-02-28 13:32 ` AdaMagica
2018-02-28 14:30 ` Mehdi Saada
2018-02-28 14:39 ` AdaMagica
2018-02-28 23:23 ` Randy Brukardt
2018-03-01 7:14 ` J-P. Rosen
2018-03-01 22:38 ` Randy Brukardt
2018-03-02 7:14 ` J-P. Rosen
2018-03-02 10:17 ` Dmitry A. Kazakov
2018-03-02 22:10 ` Randy Brukardt
2018-03-03 3:38 ` Dennis Lee Bieber
2018-03-02 22:13 ` Randy Brukardt
2018-03-02 19:37 ` G. B.
2018-03-02 19:47 ` Simon Wright
2018-03-03 9:42 ` G.B. [this message]
2018-03-01 8:20 ` Dmitry A. Kazakov
2018-03-01 8:24 ` Simon Wright
2018-03-01 20:52 ` Jacob Sparre Andersen
2018-03-01 22:45 ` Randy Brukardt
2018-03-01 8:38 ` Niklas Holsti
2018-03-01 9:11 ` Björn Lundin
2018-03-01 15:19 ` marciant
2018-03-01 17:37 ` Shark8
2018-02-28 15:26 ` Mehdi Saada
2018-02-28 15:28 ` Mehdi Saada
2018-02-28 23:32 ` Randy Brukardt
2018-03-01 0:16 ` Mehdi Saada
2018-02-28 17:24 ` Jeffrey R. Carter
2018-02-28 18:05 ` Simon Wright
2018-02-28 19:04 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox