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.182.107.162 with SMTP id hd2mr5354414obb.29.1446712474539; Thu, 05 Nov 2015 00:34:34 -0800 (PST) X-Received: by 10.182.50.225 with SMTP id f1mr93471obo.11.1446712474513; Thu, 05 Nov 2015 00:34:34 -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!feeder.erje.net!1.eu.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!i2no4549343igv.0!news-out.google.com!z4ni47133ign.0!nntp.google.com!i2no4549337igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 5 Nov 2015 00:34:34 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.98.77.125; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 194.98.77.125 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: A few questions From: briot.emmanuel@gmail.com Injection-Date: Thu, 05 Nov 2015 08:34:34 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28219 Date: 2015-11-05T00:34:34-08:00 List-Id: > The "of" form is for iterating over an array or a container whose type has > the Default_Iterator aspect (which gives the iterator to use). The main drawback, though, is that you then get a Cursor, not an Element, so you still need to call the functions Element or Reference to get to the actual element. This is slightly less convenient (syntax-wise). I wish it was possible to use "of" to indicate that we want to get an element, even when the right-side is an iterator (which for instance would be convenient when writing graph data structures where there really are lots of different ways to iterate, and a single Default_Iterator is not enough