From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8fdcbb4347c7f20a X-Google-Attributes: gid103376,public From: "Kevin J. Weise" Subject: Re: Instantiation of child generics? Date: 1996/07/26 Message-ID: <4taqvl$i11@michp1.redstone.army.mil>#1/1 X-Deja-AN: 170287789 references: <4t9itp$imd@goanna.cs.rmit.edu.au> content-type: text/plain; charset=us-ascii organization: Redstone Arsenal, Alabama mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.22 (Windows; I; 16bit) Date: 1996-07-26T00:00:00+00:00 List-Id: stt@henning.camb.inmet.com (Tucker Taft) wrote: >Dale Stanbrough (dale@goanna.cs.rmit.edu.au) wrote: >: ... Also I don't really understand the rules for >: instantiaion of child generics. Can anyone explain them? > >You should think of a child of a generic as a nested generic, >which is only visible to those who choose to mention it in a with clause. >Since it is conceptually a nested generic, you can only instantiate >it once you have already instantiated the enclosing generic. ... > >We struggled during the 9X process with children of generics, since >it is certainly a bit counterintuitive that you "with" "queues.bounded" >whereas you instantiate "queue_inst.bounded." However, if you think >of a "with" clause as having the effect of "plugging" a child into >its parent unit, then you should be able to understand why children of >generics work the way they do. > FWIW, Mr. Taft, I don't think it is counterintuitive at all. If the effect is the same as if the child generic unit were nested within the parent generic unit, you would still follow the same process: instantiate the parent first, then instantiate the child WRT the instance of the parent. I think the Ada9X team did a great job on child units. Now, if you want counterintuitive, I think there are some other areas that may qualify. But they've probably already been hashed over & certainly belong in a different thread. -------------------------------------------------------------------------- Kevin J. Weise email: kweise@sed.redstone.army.mil COLSA Corp. voice: (205) 842-9083 Huntsville, AL .. standard disclaimers apply