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,a3736685ef876ab2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.68.MISMATCH!feeder.news-service.com!feeder.news-service.com!club-internet.fr!feedme-small.clubint.net!feeder1-1.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: OO Style with Ada Containers 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: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> <1s27rv0gt4ujj$.3e2k326rp54d.dlg@40tude.net> <60e46dc9-d8ca-4f47-9e8a-f90a7d45e752@w28g2000hsf.googlegroups.com> Date: Tue, 20 Nov 2007 10:06:24 +0100 Message-ID: NNTP-Posting-Date: 20 Nov 2007 09:59:13 CET NNTP-Posting-Host: 76993adc.newsspool1.arcor-online.net X-Trace: DXC=IgR0_\Mb@8LWDmlTRbh@=Iic==]BZ:afN4Fo<]lROoRAFl8W>\BH3YB6Pe?64IUYkNDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBAkAVN>>ba`F X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18523 Date: 2007-11-20T09:59:13+01:00 List-Id: On Mon, 19 Nov 2007 12:45:12 -0800 (PST), Maciej Sobczak wrote: > On 19 Lis, 17:19, "Dmitry A. Kazakov" > wrote: > >>> Consider a virtual iterator that does not have >>> *any* container behind, but can serve as a sequence generator. And so >>> on. >> >> An iterator always has a container behind (a class of containers actually). >> If you generate just a sequence, where do you know the mapping of the >> sequence onto the elements of a container? > > Why should I bother with mapping the sequence onto the container if > there is no container? Because the sequence will be later used with a container. And not to forget, a sequence itself is a container. It is an ordered set of elements. > This is not each second element. This is a sequence 2,4,6,8 (but it > really does not make any difference). Of course it does. Because in an ordered set you can query for the next element of. Is Succ (2) = 4? You cannot "take" values as they are. There is no values without types of. > Now consider an iterator generating a (samples of) sine wave with > given parameters. Infinitely! It plays a sound using attached DAC. > There is no container behind. Just a sequence. This is a totally wrong analogy with many more things assumed, than just a container. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de