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-10 21:48:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!peer1.news.newnet.co.uk!news-peer.gradwell.net!not-for-mail Newsgroups: comp.lang.ada From: porton@ex-code.com (Victor Porton) Date: Mon, 11 Nov 2002 10:47:46 +0500 References: <3dcd00f3$0$307$bed64819@news.gradwell.net> Organization: Extreme Code Software (http://ex-code.com) Subject: Re: Problem with Booch iterators Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Content-Type: text/plain; charset=us-ascii X-URL: http://www.ex-code.com/ Message-ID: <3dcf44b7$0$300$bed64819@news.gradwell.net> NNTP-Posting-Date: 11 Nov 2002 05:48:39 GMT NNTP-Posting-Host: 195.149.39.13 X-Trace: 1036993719 news.gradwell.net 300 mail2news/195.149.39.13 X-Complaints-To: news-abuse@gradwell.net Xref: archiver1.google.com comp.lang.ada:30700 Date: 2002-11-11T05:48:39+00:00 List-Id: In article , Simon Wright writes: > porton@ex-code.com (Victor Porton) writes: > >> There are a serious misdesign of Booch iterators: >> >> Declaring a record component of type Iterator'Class, >> I get error "unconstrained subtype in component declaration". >> >> So for every non-abstract collection type, a concrete iterator >> type should be visibly declared. It also suggests that types of >> arguments of subrountines should be changed from Iterator'Class >> to the appropriate concrete types. >> >> Simon, why you've used Iterator'Class everywhere? > > Given the way the BC iterators work, I don't know what good having > iterators in records is going to do you. Iterator ranges, see my other message. > I don't like the idea of unbound iterators floating around (I suppose > though it's no worse than a Text_IO.File_Type). What is "unbound iterator"? > Since there are at least 3 projects using the BCs to earn themselves > money (even if I don't see any of it, except indirectly) I won't make > backwards-incompatible changes; and I'm reluctant to add operations > and features, unless it can be done in a way which doesn't increase > the footprint. I would be more inclined to remove things .. BC_Lite, I > guess. Changing Iterator'Class to concrete iterators in some subrountines' specification does not add real incompatibility: in any case passing a wrong iterator type is a mistake. Well, to archive good backward compatibility we need something like Concrete_Iterator'Class in subrountines' specs. Automatic type conversions will do the thing we need.