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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Two approaches of iterators for the key-value pairs Date: Sat, 28 Nov 2015 23:34:40 +0000 Organization: A noiseless patient Spider Message-ID: References: <0c524381-442a-49cc-9d72-27a654320153@googlegroups.com> <073bed9a-32f2-4045-93ec-064322edf883@googlegroups.com> <834c6afa-870e-4921-a1f1-4fe2b061811a@googlegroups.com> <247bcf0b-af39-4e78-abe9-aa4810042f98@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="fa1ef3748c46c80a9a627d7896b0bfd1"; logging-data="13937"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JMv60PPsO2QvzIrRaLVU1UXHQnCcDNVU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:zbGqfx6mjYNCdBv6Ls79npUHsMQ= sha1:nsQfhEL185JQtMEDD80xZ/BO3I8= Xref: news.eternal-september.org comp.lang.ada:28582 Date: 2015-11-28T23:34:40+00:00 List-Id: Brad Moore writes: > My comment was about having to create an extra declaration in the > packages Ada.Directories and Ada.Environment_Variables to define a > container type. Yes, I got that. I'm just saying that we call this extra type a container type because it was invented in the context of Ada.Containers; ARM 5.5.2(3) says "For the second form of iterator_specification [that is, the form that uses 'of'], the expected type for the iterable_name is any array or iterable container type. If the iterable_name denotes an array object, the iterator_specification is called an array component iterator; otherwise it is called a container element iterator." but we are now discovering that we don't just want to use it for containers, rather for anything we might want to iterate over, such as directory entries, prime numbers, ... I suspect we could delete the word 'container' throughout the existing 5.5.2 (and 4.1.6) without losing anything significant. There'd have to be a hint about the point of it all, of course!