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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,984d3d7860d7c8c X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!wn13feed!worldnet.att.net!216.196.106.140!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 09 Jun 2004 02:03:52 -0500 Date: Wed, 09 Jun 2004 03:03:51 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Where are returned values stored? References: <75s9b0pgo91ctvlm5op2rcql82t9ip4me2@4ax.com> <1dptc.49822$tb4.1731604@news20.bellglobal.com> <2hv1auFhi91aU1@uni-berlin.de> <2i910dFk02i0U1@uni-berlin.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-pRCD/6FfrH/a1dO9XrDi6tc31liEWrMr5ICxV3G9UD0Z3BSQJDYhneaGkMIgMso2QY/X0TGram1ecXN!4cE5Q6eG6m4RW26E00U9HfjmxPPxqO8REUkY18EUOEwXdbzIVmMv9s3L2PKTxw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net 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.1 Xref: g2news1.google.com comp.lang.ada:1275 Date: 2004-06-09T03:03:51-04:00 List-Id: Larry Kilgallen wrote: > Merely having hardware capable of 64-bit addressing does not speed the > copying of that 2 Gigabyte string, so performance might be awful. On > the other hand, there is a greater likelyhood the program will run to > completion, which is a correctness issue. I don't know if you missed the point or not. Yes, it is a correctness issue, and all Ada compiler developers will choose an implementation model which is correct over one that is 'mostly' correct and faster. But there is an implicit expectation that the programmers understand these issues well enough to choose a solution which is both correct, and tolerant of these 'hidden' assumptions. For example, if I write a program to 'read a file a line at a time.' If I don't either know what system enforced maximum line length is or choose a arbitrary length and change algorithms for lines longer than that length, I have failed to use good software engineering practice. Notice that there is no inherent 'magic number' for when a line gets processed differently. I tend to use 132 characters, some people I know prefer 253, or 255, or 1023. The actual number doesn't matter that much. Just that you know you won't have nasty problems if someone gives you a non-text file. Similarly, Ada allows me to put arbitrary objects on the stack at run-time. But that means that it is my responsibility as a software engineer to insure that the stack won't overflow. There are often only one or two declarations that I have to "worry about" in a program, but IMHO knowing which ones those are and how to do the necessary analysis is software engineering, not programming. This is why I used to say that learning Ada is 95% software engineering and 5% syntax. This analysis is often don't "off to one side" and at best results in a one-line comment in the source code. But Ada puts the onus of doing this sort of thinking directly on the programmer. Ada makes implementing whatever you decide easy. But it can't decide for you. I used to teach that when these situations come up, Ada asks you a question. There was a discussion here about Apples and Oranges the other day which illustrates my point exactly. If the requirements say count "at least 100" apples, how do you define the subtype? There will be an upper bound, but it is up to the programmer to choose a sensible one. -- Robert I. Eachus "The terrorists rejoice in the killing of the innocent, and have promised similar violence against Americans, against all free peoples, and against any Muslims who reject their ideology of murder. Their barbarism cannot be appeased, and their hatred cannot be satisfied. There's only one way to deal with terror: We must confront the enemy and stay on the offensive until these killers are defeated." -- George W. Bush