comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Why parameter passing by copy?
Date: 2000/05/28
Date: 2000-05-28T00:00:00+00:00	[thread overview]
Message-ID: <8gpqeg$ost$1@nnrp1.deja.com> (raw)
In-Reply-To: IKUX4.1974$Rn4.185168@nnrp3.sbc.net

In article <IKUX4.1974$Rn4.185168@nnrp3.sbc.net>,
  "Pat Rogers" <progers@NOclasswideSPAM.com> wrote:
> 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.

Actually, historically it is at least as much a concern for
efficiency. Everyone recognized that call by copy is more
efficient. It is certainly true that once you have decided
that call by copy is more efficient, it is also a nice benefit
that it is cleaner semantically.

Note that Ada is definitely concerned with efficiency over
avoiding aliasing. We can tell that with objects other than
scalars, where we accept not just call by reference, but
implementation dependence, in an effort to maximize efficiency.

Basically Ada took the same approach as Fortran in this regard.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-05-28  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-27  0:00 Why parameter passing by copy? Dale Stanbrough
2000-05-27  0:00 ` Robert Dewar
2000-05-27  0:00 ` Pat Rogers
2000-05-28  0:00   ` Robert Dewar [this message]
2000-05-27  0:00 ` Thierry Lelegard
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox