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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: some trivial questions? Date: Tue, 7 Nov 2017 09:34:07 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <6a5368c5-f015-4dcb-9291-e77b40fa1bf1@googlegroups.com> NNTP-Posting-Host: lKHBldubgAWx1EqbQpQ5LQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:48755 Date: 2017-11-07T09:34:07+01:00 List-Id: On 06/11/2017 23:37, Robert A Duff wrote: > tclwarrior@gmail.com writes: >> Is there any real value in this? > > Not really. I'd prefer that both things be called "procedure". Or function return null (:-)) > Then we wouldn't need the terms "function" and "subprogram". > But we'd still need a distinction between procedures that > return a value and those that don't. And we still need distinction between them in protected objects. But that is the issue of conflation of dedicated output with no-effects. > I'd also prefer that function results and 'out' parameters > have identical semantics, which they don't in Ada. Yes, but there are syntax problems with that: procedure Generate_Two_Strings (X, Y : out String); How do I declare X, Y : constant String := Generate_Two_Strings; How do I do 2 x Ada.Text_IO.Put_Line (Generate_Two_Strings); > But you don't want use_clauses that are > nested deep inside some block_statement to imply a "with". Why not? BTW, there is no reason why "with" should not be nested. If a unit can depend or not on a unit so a block can. One could even invent some interesting elaboration rules for nested "with"s. (:-)) And in effect nested "with" do exist for separate bodies. > I think nested packages and child packages should have identical > semantics (so "with" should apply to both). That was probably > impossible, because child packages were invented too late. Yes. E.g. what if nested package instantiation would not imply "with"? Should the similar [flawed] logic apply here as to "use"? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de