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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,52fd60a337c05842 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 22:28:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!wn4feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3D1016D8.6030705@attbi.com> From: "Robert I. Eachus" Organization: Eachus Associates User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ada paper critic References: <3D0A399C.EF6F1BD9@acm.org> <3D0B4CCC.7010104@telepath.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.61.239.24 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1024464533 24.61.239.24 (Wed, 19 Jun 2002 05:28:53 GMT) NNTP-Posting-Date: Wed, 19 Jun 2002 05:28:53 GMT Date: Wed, 19 Jun 2002 05:28:53 GMT Xref: archiver1.google.com comp.lang.ada:26352 Date: 2002-06-19T05:28:53+00:00 List-Id: Marin David Condic wrote: > As an Ada True Believer in good standing and one who has used the language > for a long number of years, I can honestly say that I cannot recall ever > having decided to change an array reference into a function call, or the > other way around. Maybe its just me. Maybe it was the application domains I > have worked in. But generally, by the time I got to coding something up, the > architecture of the program was pretty well a fixed decision and arrays > stayed arrays and functions stayed functions. So maybe I just can't see why > its such a big deal that arrays and functions have the same syntax - or for > that matter why they should have separate syntax. Now that you mention it... I don't think I have ever run into the problem either, but not for the reason you suggest. Let me come in from left field. I am sure you have been burned by non-constant constants in package specifications high in the dependency tree. And often when you change the package to put the value in the body and make the call a function you get burned, by declarations which took advantage of the staticness of the constant. So when you replace: Number_of_Processors: constant 4; with: function Number_of_Processors return Integer; There are always a few units that need to be modified. Of course there is no problem going the other direction, but no one ever does it. However, when it comes to: function Internet_Address(P: in Processor) return IP_Address; You always get that one right. At least I hope you do. I certainly find it very unusual to have tabular data that belongs in a package specification as a constant array. (I actually had one recently--a table of the first 1000 prime numbers. I hope those don't change on me!)