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!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 06 Sep 2017 21:53:15 -0500 Newsgroups: comp.lang.ada Subject: Re: Why does Ada.Iterator_Interfaces specify Next as a function rather than a procedure? From: csampson@inetworld.net (Charles H. Sampson) Date: Wed, 6 Sep 2017 22:53:15 -0400 Message-ID: <1nbyclb.qumlbu16r8na1N%csampson@inetworld.net> References: <693d41af-1da7-4c47-825a-198a082aaf9a@googlegroups.com> User-Agent: MacSOUP/2.8.5 (ea919cf118) (Mac OS 10.11.6) X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-vUI5NPz5G92bkN/ns2dUFUneGZ15wpRtO9J9HwjSdHOwvWTFpSgpugtiMpZQ68PAJuxhwedA7VQZAgv!gQ4V5hc4Qe38drHflGbbn7KQRn/d8oSbLeqYMJGy1hlEzFgHhwVjL0qNObJ+PeVjkJWf9Xq1CfwT X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1885 Xref: news.eternal-september.org comp.lang.ada:47962 Date: 2017-09-06T22:53:15-04:00 List-Id: 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)