comp.lang.ada
 help / color / mirror / Atom feed
From: csampson@inetworld.net (Charles H. Sampson)
Subject: Re: Why does Ada.Iterator_Interfaces specify Next as a function rather than a procedure?
Date: Wed, 6 Sep 2017 22:53:15 -0400
Date: 2017-09-06T22:53:15-04:00	[thread overview]
Message-ID: <1nbyclb.qumlbu16r8na1N%csampson@inetworld.net> (raw)
In-Reply-To: 693d41af-1da7-4c47-825a-198a082aaf9a@googlegroups.com

This response ignores all the specifics of your question. Sorry.

To me this is conceptual. In answer to the question "When should a
subprogram be a function and when should it be a procedure with an out
parameter?", my answer was always, "If the primary purpose of the
subprogram is to calculate a value, it's a function, even if it does
processing other than just calculating that value. If the primary
purpose of the subprogram is to carry out an action, it's a procedure,
even if it returns a single value as part of that action."

Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)


  parent reply	other threads:[~2017-09-07  2:53 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 [this message]
2017-09-07  6:16 ` briot.emmanuel
2017-09-07 23:17   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox