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,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-08 08:28:20 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Date: 08 Jan 2004 11:28:19 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <3fe00b82.90228601@News.CIS.DFN.DE> <5802069.JsgInS3tXa@linux1.krischik.com> <1072464162.325936@master.nyc.kbcfp.com> <1563361.SfB03k3vvC@linux1.krischik.com> <11LvOkBBXw7$EAJw@phaedsys.demon.co.uk> <3ff0687f.528387944@News.CIS.DFN.DE> <1086072.fFeiH4ICbz@linux1.krischik.com> <3ff18d4d.603356952@News.CIS.DFN.DE> <1731094.1f7Irsyk1h@linux1.krischik.com> <3ff1b8ef.614528516@News.CIS.DFN.DE> <3FF1E06D.A351CCB4@yahoo.com> <3ff20cc8.635997032@News.CIS.DFN.DE> <3ff9df16.30249104@News.CIS.DFN.DE> <3FFC0201.6020303@noplace.com> NNTP-Posting-Host: pip1-5.std.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1073579299 6230 192.74.137.185 (8 Jan 2004 16:28:19 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 8 Jan 2004 16:28:19 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:4212 Date: 2004-01-08T11:28:19-05:00 List-Id: "Frank J. Lhota" writes: > "Robert A Duff" wrote in message > news:wcc65fn9vtb.fsf@shell01.TheWorld.com... > > During the Ada 9X project, some folks suggested making it a procedure. > > This was considered a non-starter, primarily because Fortran uses a > > function, and that's what people expect. It is rather strange that > > (some of) the same language designers who choked at the idea of making > > Random a procedure were adamant about forbidding 'in out' params. > > Was there any discussion of using access types, i.e. > > function Random (Gen : access Generator) return Result_Subtype; > > This would require that each generator is aliased, and that 'Access > attributes be used, but at least this would give some recognition to the > fact that the generator is changed by the call. As far as I can remember, this idea was considered, and was generally thought to be ugly. I mean, suppose you're trying to convince a Fortran programmer to use Ada for numerics stuff. If you start babbling about aliased and 'Access when there is no inherent need for pointers, they're going to laugh, and rightly so. It would boil down to this rule: "All variables of type Generator must be declared aliased, for reasons only some crazy language lawyer types can explain." The random number package was designed to be easy to use. Introducing pointers, or making Random a procedure, were thought to be annoyances. - Bob