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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,21321460863e2689 X-Google-Attributes: gid103376,public From: "Pat Rogers" Subject: Re: Why parameter passing by copy? Date: 2000/05/27 Message-ID: #1/1 X-Deja-AN: 628028593 References: X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: abuseswbell.net X-Trace: nnrp3.sbc.net 959453224 208.191.184.67 (Sat, 27 May 2000 13:47:04 CDT) Organization: SBC Internet Services X-MSMail-Priority: Normal NNTP-Posting-Date: Sat, 27 May 2000 13:47:04 CDT Newsgroups: comp.lang.ada Date: 2000-05-27T00:00:00+00:00 List-Id: "Dale Stanbrough" wrote in message news:dale-277623.23001027052000@news.rmit.edu.au... > Ada requires that scalars be passed by copy. I was under the impression > that this was chosen because it was faster, but i've never seen a > rational argument for this from the Ada83 perspective of computer > hardware, nor whether such arguments still hold true for modern > processors. > > Can anyone shed any light on this? Passing things by copy precludes aliasing, which can lead to nasty surprises. For scalars there is no speed penalty so the language mandates it for the safety aspect. -- Pat Rogers Consulting and Training in: http://www.classwide.com Deadline Schedulability Analysis progers@classwide.com Software Fault Tolerance (281)648-3165 Real-Time/OO Languages