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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,34c2aa33b8bdb1a9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-21 09:03:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Sugestion to Multiple Inheritance Date: Mon, 21 Jan 2002 17:00:36 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3C444B8D.70309@mail.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1011632436 12664 217.17.192.37 (21 Jan 2002 17:00:36 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 21 Jan 2002 17:00:36 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:19146 Date: 2002-01-21T17:00:36+00:00 List-Id: * Brian Rogoff wrote: >Yes, generics can do exactly that. Do you understand the signature idiom >in Ada 95? Now I start to understand. Thanx. >What you don't get, that tagged types give you, is the same kind of >polymorphism at run time. You pay for that run time capability with run >time dispatch and the overhead of tagging. Of course. I was looking for an abstraction require a full instantiation. Generics does this a small step later than abtract tagged types. (Besides using tagged types for saving multiple implementations.) Without class wide programming there is no run-time overhead, but a storage one. >So you parameterize over a forward iterator signature, which looks >something like this > >generic > type Value_Type (<>) is limited private; > type Pointer_Type is access Value_Type; > type Iterator_Type is private; > > with procedure Incr (Iterator : in out Iterator_Type) is <>; > with function Succ (Iterator : in Iterator_Type) > return Iterator_Type is <>; > with function Get_Value (Iterator : Iterator_Type) > return Value_Type is <>; > with procedure Set_Value (Iterator : in out Iterator_Type; > Value : in Value_Type) is <>; > with function Get_Pointer (Iterator : Iterator_Type) > return Pointer_Type is <>; > with function "=" (X, Y : Iterator_Type) > return Boolean is <>; >package Forward_Iterator_Signature is >-- Look, no body! This is a signature package. >end Forward_Iterator_Signature; Understand. Thank you. This seems to be the way Booch is working.