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-Thread: 103376,229ea0001655d6a2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.mind.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Generic Package Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1177539306.952515.222940@s33g2000prh.googlegroups.com> <1177601484.444701.171560@r35g2000prh.googlegroups.com> <1177672290.8055.6.camel@localhost> <1177683046.12952.4.camel@localhost> <10s763mibaxrd.1fj5hiz8r6tnq.dlg@40tude.net> <1177710244.6428.9.camel@localhost.localdomain> Date: Sat, 28 Apr 2007 09:38:49 +0200 Message-ID: NNTP-Posting-Date: 28 Apr 2007 09:38:33 CEST NNTP-Posting-Host: f22de79c.newsspool2.arcor-online.net X-Trace: DXC=l5VejDDBmZKAa;:RKVJ>LEA9EHlD;3YcB4Fo<]lROoRA8kF On Fri, 27 Apr 2007 23:44:04 +0200, Georg Bauhaus wrote: > On Fri, 2007-04-27 at 16:16 +0200, Dmitry A. Kazakov wrote: >> On Fri, 27 Apr 2007 16:10:47 +0200, Georg Bauhaus wrote: >> >>> On Fri, 2007-04-27 at 14:06 +0200, Dmitry A. Kazakov wrote: >>> >>>> It does. Semantically, table /= a snapshot of. That is. >>> >>> For Iterate, a snapshot is a table, a collection of tuples. >> >> Well, for a hammer everything is a collection of nails. > > Please. From a user's perspective Iterate is the important > interface. Yes, but it is not the interface of a set of tuples. It is an interface of some ordered container. > When I call Iterate to apply an operation to > each tuple of a table, an order is established, even though > it does not matter. This is too swampy. There is a sufficient difference between foreach closures and interators. You can have foreach on an unordered set, but you cannot have iterators. The difference is in who has the control over the enumeration process. Iterators are more binding for the container and less for the user of. Consider a library. Say you wished to read all books there. You come to the librarian and order a book. Then you read that book and return. Now, you can ask him: give me another book. But you cannot require him to give you a book that you haven't yet read. That is your business, he would answer. The librarian interface is of an unordered set (no iterators). Yet you could give him a set of post-it notes with numbers on them and ask him to put one on each of the books. (Later you probably could ask him for a book with the specific number on it). He could still refuse but then you would come back with a flame thrower and burn the library and the damned books down. Both were examples of foreach. > I really don't understand why Iterate should not be able > to produce a positional number for each tuple it produces. Because it is not how relational algebra was specified. If you are objecting to its idea, well, I am with you, and the most of DB vendors are as well, as they all provide row IDs to ease our life. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de