From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada syntax questions Date: Fri, 18 Dec 2020 21:35:37 +0200 Organization: Tidorum Ltd Message-ID: References: <5fdbde31$0$6455$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Hzg973tukp9iKcs9Pbg9UQsDSE3mjN9rnVKv2A4RQFfYo7rOsj Cancel-Lock: sha1:7RVRzLDGTGyy9F+Hvy2lmWzsC6w= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 In-Reply-To: <5fdbde31$0$6455$426a74cc@news.free.fr> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:60883 List-Id: On 2020-12-18 0:39, DrPi wrote: > Hi, > > Ada claims to have a better syntax than other languages. I would say the claim is that the Ada syntax was rationally designed to have certain properties, which are desired by certain users (us Ada programmers) so it is "better" for us, although some aspects are subjective for sure. In addition to what others have said, here are some further comments on the examples you gave: > 1) What about array indexing ? > In some other languages, arrays are indexed using square brackets. In > Ada, parentheses are used for function calls and for array indexing. There are proposals to allow [] as well as (), mainly to increase familiarity for new Ada users. > 2) In Ada, a function without arguments is called without any parentheses. Parameterless functions are rare, and properly so. Parameterless procedures are much more common. Writing Frobnicate_Widget(); is longer than Frobnicate_Widget; and seems to have no advantages over the shorter form.