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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why does Ada.Iterator_Interfaces specify Next as a function rather than a procedure? Date: Thu, 7 Sep 2017 18:17:54 -0500 Organization: JSA Research & Innovation Message-ID: References: <693d41af-1da7-4c47-825a-198a082aaf9a@googlegroups.com> <806ff091-efd2-4625-afec-c7a6dc7886a8@googlegroups.com> Injection-Date: Thu, 7 Sep 2017 23:17:55 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="11940"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:47977 Date: 2017-09-07T18:17:54-05:00 List-Id: wrote in message news:806ff091-efd2-4625-afec-c7a6dc7886a8@googlegroups.com... >In my experience, a simpler approach is to use GNAT's Iterable aspect, >which >is way simpler and more logical (really just a thin layer about the usual >Cursor/Has_Element/Next/... operations). If he's trying to create portable Ada code, that's hardly an option. Perhaps Ada 202x will include an easier solution to the problem. I tend to agree that the use of interfaces here was a mistake; we ended up needing a bunch of aspects to make the solution usable, and at that point we should have just abandoned the interfaces and just used aspects. (This is one of my reasons for saying that interfaces themselves are pointless.) In any case, though, portable Ada code is stuck with them. Randy.