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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa18fb47ddd229a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-19 09:12:58 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-036-184.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Proposed change to BC iterator parameters Date: Fri, 19 Dec 2003 18:19:11 +0100 Organization: At home Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-036-184.arcor-ip.net (145.254.36.184) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1071853977 8208937 145.254.36.184 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3570 Date: 2003-12-19T18:19:11+01:00 List-Id: Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: > > : function Search (X : Container; Key : Item_Key) return Item is > : begin > : Enumerate > : ( X, > : procedure (I : Item) is > : begin > : if Get_Key (I) = Key then > : return I out Search; -- Return through all nested contexts > : end if; > : end; > : ); > : raise Nothing_Found; > : end Search; > > wouldn't an active(?) iteration do the job in a satisfying way, > using is_done, element, and next, in a loop? But Robert wants it in a non-OO way! I think that he's right. The language should support both procedural and OO approaches, for they are complimentary. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de