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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.186.16 with SMTP id fg16mr23477920pac.0.1447521844328; Sat, 14 Nov 2015 09:24:04 -0800 (PST) X-Received: by 10.182.112.234 with SMTP id it10mr261835obb.13.1447521844280; Sat, 14 Nov 2015 09:24:04 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!adore2!news.litech.org!news.glorb.com!i2no3144349igv.0!news-out.google.com!l1ni4339igd.0!nntp.google.com!i2no3144326igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 14 Nov 2015 09:24:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=174.28.149.7; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 174.28.149.7 References: <1dolqizyi8gxi.t3173bhifuu1.dlg@40tude.net> <1705bpj6jrld0.1lc44o5yo6bj7$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: A few questions From: Shark8 Injection-Date: Sat, 14 Nov 2015 17:24:04 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28365 Date: 2015-11-14T09:24:04-08:00 List-Id: On Saturday, November 14, 2015 at 5:37:32 AM UTC-7, Simon Wright wrote: > > It's a pity that Next takes the iterator object as an 'in' > parameter. This means that, in general, the cursor needs to hold the > state. It certainly needs some way of indicating end-of-iteration; > perhaps a sentinel value. Sentinel values, or exceptions? C-style strings use ASCII.NUL as a sentinel value, and look at the trouble that causes. (Of course part of that is due to the anemic idea of arrays that C has.)