comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: making a son benefit access ton an instanciation of a generic package required as a formal parameter to his father and instanciated by him
Date: Mon, 22 Jan 2018 07:54:26 -0800 (PST)
Date: 2018-01-22T07:54:26-08:00	[thread overview]
Message-ID: <d6dcd0ab-9076-4e5b-bde3-1efd1d2a8c5a@googlegroups.com> (raw)
In-Reply-To: <d39067b1-4b8a-41b5-b7cb-8db4a1e221fe@googlegroups.com>

Le lundi 22 janvier 2018 16:36:10 UTC+1, Mehdi Saada a écrit :
> > Imagine this:
> > generic
> >    package P1 is new GP1 (<>);
> >    package P2 is new GP1 (<>);
> > package GP2 is... end GP2;
> package Inst1 is new GP1;
> package Inst2 is new GP2 (Inst1, Inst1);
> then you would end up with two different handlers for the same exception (since formals P1 and P2 are actually the same package Inst1). And that's a no-no!
Ah ! Now I get it. Earlier explanations seemed like chinese homonyms, but a fine example makes it crystal clear. The terminology is this area, is still too abstract and confuses me, 'cause I barely touched it yet. I didn't considered that eventuality of two different views (is that the term ?) of the same instances screwing with each others... eventhough it's not so much convoluted.


... Thinking about it, I was under the false assumption that the generic itself was passed as parameter, and instanciated by or inside the second generic package, whereas it's clear from the instanciation of the latter, that it takes on an INSTANCE. I wasn't even conscious of that confusion. It just messed up my reasoning...


  reply	other threads:[~2018-01-22 15:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 15:43 making a son benefit access ton an instanciation of a generic package required as a formal parameter to his father and instanciated by him Mehdi Saada
2018-01-21 15:58 ` Simon Wright
2018-01-21 17:30   ` Mehdi Saada
2018-01-21 17:39     ` Simon Wright
2018-01-21 17:50     ` Dmitry A. Kazakov
2018-01-21 20:15       ` Mehdi Saada
2018-01-21 20:41         ` Dmitry A. Kazakov
2018-01-21 21:29           ` Mehdi Saada
2018-01-21 21:31             ` Mehdi Saada
2018-01-21 22:20               ` Jeffrey R. Carter
2018-01-21 23:07                 ` Mehdi Saada
2018-01-21 23:10                   ` Mehdi Saada
2018-01-22  8:28                   ` Dmitry A. Kazakov
2018-01-22  9:25                     ` Simon Wright
2018-01-23  1:23           ` Randy Brukardt
2018-01-21 22:04         ` J-P. Rosen
2018-01-22 15:36           ` Mehdi Saada
2018-01-22 15:54             ` Mehdi Saada [this message]
2018-01-22 15:52           ` Simon Wright
2018-01-23  1:33             ` Randy Brukardt
2018-01-23 14:05   ` Mehdi Saada
2018-01-23  1:13 ` 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