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,f039470e8f537101 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-29 20:05:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Non-philosophical definition of Eiffel? From: Berend de Boer Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-msvc-nt5.0.2195) References: <1058968422.225561@master.nyc.kbcfp.com> <3F200AD0.94F79098@adaworks.com> <7u9Ua.13412$634.10307@nwrdny03.gnilink.net> <3F215120.1040706@attbi.com> <1059151910.357790@master.nyc.kbcfp.com> <1059416297.548253@master.nyc.kbcfp.com> <1059510832.459614@master.nyc.kbcfp.com> Cancel-Lock: sha1:WlvMlFIrlyMVSirUktuqBDFCqeo= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 30 Jul 2003 15:03:14 +1200 NNTP-Posting-Host: 219.88.64.124 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1059534326 219.88.64.124 (Wed, 30 Jul 2003 15:05:26 NZST) NNTP-Posting-Date: Wed, 30 Jul 2003 15:05:26 NZST Organization: Xtra Xref: archiver1.google.com comp.lang.ada:40982 Date: 2003-07-30T15:03:14+12:00 List-Id: >>>>> "Hyman" == Hyman Rosen writes: Hyman> Huh? I have no idea what you're talking about. Both C++'s Hyman> STL containers and Matthew Heaney's equivalent Charles Hyman> library in Ada have typesafe containers which involve no Hyman> casting, and have no wrong-way bag-of-apples is a subclass Hyman> of bag-of-fruit issues. As I wasn't sure about STL, I just looked at C++ support for covariance. Low and behold I found this: Covariance of Virtual Member Functions The implementation of virtual constructors relies on a recent modification to C++, namely virtual functions' covariance. An overriding virtual function has to match the signature and the return type of the function it overrides. This restriction was recently relaxed to enable the return type of an overriding virtual function to co-vary with its class type. Thus, the return type of a public base can be changed to the type of a derived class. The covariance applies only to pointers and references. http://documentation.captis.com/files/c++/handbook/ch04/ch04.htm#Heading18 Fortunately I'm not a C++ expert so I can't really asses your claim that the STL container libray offers the same functionality as an Eiffel generic container library. But I really doubt it. -- Regards, Berend. (-: