Issue 558: OfferIdIterator::next_n return value (zz-trader) Source: (, ) Nature: Uncategorized Severity: Summary: Summary: Boolean return value of OfferIdIterator::next_n() is redundant. and it is ill-defined to control a loop. (see archive to this issue) Resolution: Revised Text: Actions taken: April 28, 1997: received issue Discussion: End of Annotations:===== Return-Path: X-Authentication-Warning: foxtail.dstc.edu.au: michi owned process doing -bs Date: Mon, 28 Apr 1997 13:26:24 +1000 (EST) From: Michi Henning cc: trader-tech@foxtail.dstc.edu.au, trader-wg@foxtail.dstc.edu.au Subject: OfferIdIterator::next_n return value Errors-To: owner-issues Sender: owner-issues X-OMG: issues To: issues Hi, The boolean return value of OfferIdIterator::next_n() is redundant (the length of the returned sequence can be used just as well), and it is ill-defined to control a loop. The simple way to write a loop is wrong: while (iterator->next_n(20, offer_ids) { // process batch } This misses out on the last batch of offer ids. Instead, I have to write: while (iterator->next_n(20, offer_ids) { // process batch } if (offer_ids->length() != 0) { // process final batch... } I suspect this will lead to people ignoring the return value anyway and writing: iterator->next_n(20, offer_ids); while (offer_ids->length() != 0) { // process batch... iterator->next_n(20, offer_ids); } I would suggest to either - eliminate the boolean return value and use the sequence length instead, or - change the definition of the return value such that TRUE is returned whilst the out sequence contains at least one offer, and FALSE when the out sequence contains no offers. Cheers, Michi. -- Michi Henning +61 7 33654310 DSTC Pty Ltd +61 7 33654311 (fax) University of Qld 4072 michi@dstc.edu.au AUSTRALIA http://www.dstc.edu.au/BDU/staff/michi-henning.html Date: Wed, 21 Mar 2001 10:57:02 +1000 (EST) From: Michi Henning To: Juergen Boldt cc: issues@emerald.omg.org Subject: Re: Lost issues In-Reply-To: <4.2.0.58.20010320104951.00a86ca0@emerald.omg.org> Message-ID: Organization: Object Oriented Concepts - An IONA Company MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: :BJe9a1K!!,[8e9=SL!! On Tue, 20 Mar 2001, Juergen Boldt wrote: > Hello all, > > URL http://cgi.omg.org/issues/issues.html > contains links to issues which have not been assigned to R/FTFs > because of > a couple of reasons: > ..to name a few... > a) The RTF/FTF has expired and should be re-chartered > b) The RTF/FTF has expired and will never be re-chartered again > (several > reasons why are possible) > c) I just didn't know what RTF/FTF would be responsible for an issue > submitted.. > d) There appear to be no RTFs for most of the CORBAservices > e) Nobody knew about this issues archive > > With your help some of those issues could be resolved (by assigning > some of > those issues to active RTFs/FTFs or by rechartering some of the > expired > RTFs...) Here are some proposals: Issue 184: Close no change. I don't understand the question Issue 468: Close. The issue is empty. Issue 493: Close no change. It doesn't because the submitters decided that it wouldn't. Issue 498: From what I can recall, this refers to name equivalence in the Naming Service. INS has cleaned this, so close it. Issue 961: Move to http://cgi.omg.org/issues/event-rtf.html Issue 2347: Close. This was fixed by INS. Issue 2972: Move to http::/cgi.omg.org/issues/relationship-rtf.html Issue 3003: Close. Issue 3271: Close no change. Historically, iterators in the various specs are a total mess, and all of them, without exception, get it wrong :-( I'm afraid we have to live with the resulting inconsistencies. Issue 4216: Should probably be reassigned to Core RTF? Issues 284, 546, 547, 548, 549, 550, 558, 559, 560, 561, 562, 4225: We need a trader RTF for those. The remaining open issues also will require formation of RTFs. Cheers, Michi. -- Michi Henning +61 7 3324 9633 Object Oriented Concepts - An IONA Company +61 4 1118 2700 (mobile) Suite 4, 8 Martha St +61 7 3324 9799 (fax) Camp Hill 4152 michi.henning@iona.com Brisbane, AUSTRALIA http://www.ooc.com.au/staff/michi