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 11:39:24 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Problem with Booch iterators Date: 13 Nov 2002 11:39:23 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0211131139.50f479e1@posting.google.com> References: <3dcd00f3$0$307$bed64819@news.gradwell.net> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1037216364 8730 127.0.0.1 (13 Nov 2002 19:39:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Nov 2002 19:39:24 GMT Xref: archiver1.google.com comp.lang.ada:30831 Date: 2002-11-13T19:39:24+00:00 List-Id: 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. The Charles library was optimized for flexibility, and therefore the iterators in Charles are all "definite" subtypes, which means you can use them as record components (or array components, or container elements). > So for every non-abstract collection type, a concrete iterator > type should be visibly declared. Yes. > It also suggests that types of > arguments of subrountines should be changed from Iterator'Class > to the appropriate concrete types. Yes.