comp.lang.ada
 help / color / mirror / Atom feed
From: stt@inmet.inmet.com
Subject: Re: ADA Compiling Query
Date: 18 Feb 91 14:33:00 GMT	[thread overview]
Message-ID: <20600085@inmet> (raw)
In-Reply-To: 5572@baird.cs.strath.ac.uk


Re: passing structured parameters by reference

Michael Feldman writes:

> PS: It seems to me that Ada9x could clarify the issue by simply requiring
> that structured parameters be passed by reference (instead of the Ada83
> rule that it's implementation-dependent). Since a program whose behavior
> depends upon the method of passing is - by definition of the LRM -
> erroneous, the only programs that would break would be erroneous ones,
> which Ada9x says it doesn't care about. So the clarification would be
> upward compatible. Ada9x-ers: what would be the objections?

Here are some important reasons for allowing by-copy parameter passing:

1) It supports parameter passing between parts of a distributed
program which don't share memory.

2) It allows a slice of a packed array to be copied into an aligned
temporary, rather than forcing every subprogram to handle a descriptor
for an unaligned parameter.

3) It allows very short arrays/records to be passed in registers
(e.g. a packed array of 16 booleans).

4) It is necessary when the actual parameter is in the form of a type
conversion, and the target and source type don't have the same
representation (e.g. one is packed and the other isn't).

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138

  parent reply	other threads:[~1991-02-18 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-02-11 15:06 ADA Compiling Query Gordon Russell
1991-02-12 19:01 ` Michael Feldman
1991-02-13 21:16 ` Jeff Bartlett
1991-02-14 16:45   ` Michael Feldman
1991-02-15 23:09     ` Jim Showalter
1991-02-17  0:19       ` Reference vs. copy semantics in passing parameters Michael Feldman
1991-02-17 18:54         ` Erland Sommarskog
1991-02-18 18:41           ` Doug Smith
1991-02-18  0:36         ` Jim Showalter
1991-02-18  1:42           ` Michael Feldman
1991-02-18 18:49           ` Arthur Evans
1991-02-19  2:05             ` Michael Feldman
1991-02-18 13:10         ` madmats
1991-02-19 19:00           ` Robert I. Eachus
1991-05-16 13:51         ` Alex Blakemore
1991-05-17  8:19           ` Matthias Ulrich Neeracher
1991-05-17 13:44           ` Markku Sakkinen
1991-05-28  5:28           ` Kenneth Almquist
1991-02-18 14:33 ` stt [this message]
     [not found] <5572@baird.cs.strath.ac.uk#  <20600085@inmet>
1991-02-21 20:40 ` ADA Compiling Query Michael Feldman
replies disabled

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