From: "Randy Brukardt" <randy@rrsoftware.com>
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
Date: 2017-09-07T18:17:54-05:00 [thread overview]
Message-ID: <oosk32$bl4$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 806ff091-efd2-4625-afec-c7a6dc7886a8@googlegroups.com
<briot.emmanuel@gmail.com> 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.
prev parent reply other threads:[~2017-09-07 23:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 7:49 Why does Ada.Iterator_Interfaces specify Next as a function rather than a procedure? Stephen Leake
2017-09-06 21:50 ` Randy Brukardt
2017-09-07 1:04 ` Stephen Leake
2017-09-07 1:29 ` Stephen Leake
2017-09-07 23:14 ` Randy Brukardt
2017-09-07 2:53 ` Charles H. Sampson
2017-09-07 6:16 ` briot.emmanuel
2017-09-07 23:17 ` Randy Brukardt [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox