From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: calling function but ignoring results Date: Sat, 3 Jul 2021 10:57:20 +0300 Organization: Tidorum Ltd Message-ID: References: <69a59fdc-72bb-4202-99fc-d776530de653n@googlegroups.com> <0cc35778-1d06-4e7d-853c-498735faf627n@googlegroups.com> <08c7e196-2bfc-49e9-9035-45a700b8687an@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net JWnr7N0tPqKjrRHBAPkmYQthTf0RpEumW+Ygh7rPKk/N+CbvMd Cancel-Lock: sha1:BPDwjikK35C9YS1lFlwi32FMd84= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <08c7e196-2bfc-49e9-9035-45a700b8687an@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:62323 List-Id: On 2021-07-03 10:37, Gautier write-only address wrote: > Le samedi 3 juillet 2021 à 06:59:19 UTC+2, Matt Borchers a écrit : >> Thanks for the feedback. I guess I have to live with five lines to >> accomplish what one should do regardless of the numerous variety of >> ways to accomplish this. I mostly appreciate the wordiness of Ada >> for the clarity it offers to the code maintainers, but in some >> cases the extra wordiness offers nothing. > > If you use functions properly (only "in" parameters and not side > effects) you don't have this issue at all. However, the problem then changes to ignoring unneeded "out" parameters of procedures, and the only way (currently) is to declare dummy output variables and then leave them unused. But it is not a big problem, and not worth changing the language, IMO. > Interfacing with C is an edge case which doesn't need to add more > noise in the Ada syntax, IMHO. I agree.