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,29b1b6650a74a211 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-13 22:44:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Problem with Booch iterators Date: 14 Nov 2002 06:44:28 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <3dcd00f3$0$307$bed64819@news.gradwell.net> <1ec946d1.0211131139.50f479e1@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1037256265 15068 62.49.19.209 (14 Nov 2002 06:44:25 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 14 Nov 2002 06:44:25 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:30852 Date: 2002-11-14T06:44:28+00:00 List-Id: mheaney@on2.com (Matthew Heaney) writes: > porton@ex-code.com (Victor Porton) wrote in message news:<3dcd00f3$0$307$bed64819@news.gradwell.net>... > > There are a serious misdesign of Booch iterators: > > > > Declaring a record component of type Iterator'Class, > > I get error "unconstrained subtype in component declaration". > > You have identified what I consider to be a serious flaw in the > Booch Components. The problem is that record components must be > definite; unconstrained subtypes must be given a constraint. > > The BC iterator factory functions return Iterator'Class, which is > indefinite. You cannot use T'Class as a record component. But then, given a non-STL mindset, why would you want to? In the STL, iterators are related to the notion of pointer; in the BCs, they aren't (to anything like the same extent). In the original BCs, iterators were limited too, so you had to have a concrete iterator per concrete container type .. well, actually, for half of them (the leaves were foo_Iterator, foo_Non_Iterator). I would like to know just how many real C++ programs use iteration ranges other than begin() .. end(). > > It also suggests that types of arguments of subrountines should be > > changed from Iterator'Class to the appropriate concrete types. > > Yes. Well, in Charles I guess that Iterator'Class is a pretty meaningless concept.