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-22 08:55:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!dfw-feed.news.verio.net!dfw-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!bpr.best.vwh.net!bpr Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Sugestion to Multiple Inheritance In-Reply-To: Message-ID: References: <3C444B8D.70309@mail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Tue, 22 Jan 2002 16:55:51 +0000 NNTP-Posting-Host: 192.220.65.223 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 1011718485 192.220.65.223 (Tue, 22 Jan 2002 16:54:45 GMT) NNTP-Posting-Date: Tue, 22 Jan 2002 16:54:45 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:19185 Date: 2002-01-22T16:55:51+00:00 List-Id: No problem! It may be worthwhile for someone to resuscitate the RPI SGL library, which is based on the STL. When last I checked, it was still a bit buggy, and I would prefer to avoid controlled types except when necessary, but there were some good ideas there, and (at least in C++) I prefer the generic approach to the OO approaches. IMHO OOP is not as important as the programming world has made it out to be, and should be used a lot less than it is. -- Brian On Mon, 21 Jan 2002, Lutz Donnerhacke wrote: > * 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. >