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,309015504ed37ff0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-26 12:24:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feed.news.nacamar.de!eusc.inter.net!news.eusc.inter.net!boavista.snafu.de!news From: Michael Erdmann Newsgroups: comp.lang.ada Subject: Re: Usage of Interfaces with Ada 95 Date: Fri, 26 Sep 2003 21:10:17 +0200 Organization: http://www.snafu.de/~boavista Message-ID: References: <1064595326.831730@master.nyc.kbcfp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.eusc.inter.net 1064604264 6584 213.73.71.217 (26 Sep 2003 19:24:24 GMT) X-Complaints-To: abuse@eusc.inter.net User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:43018 Date: 2003-09-26T21:10:17+02:00 List-Id: Hyman Rosen wrote: > Michael Erdmann wrote: >> i like to provide a package of elementary interfaces providing some >> basic concepts on which a application is build, for example a >> so called Enumeration type > > Using inheritance for iterators is silly and wrong, > since the base iterator class can't express anything > about what it iterates over, or what type it returns. This is the reason why it is abstract and a generic. > > Go see the Charles library for how to do it right. > > DK, this is your cue :-) The point is that in java i am able to provide an interface which is called IIterator and use this interface in different implementation, but it is the same interface which has to be understood by the programmer only once! Michael