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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!inmet!stt From: stt@inmet.inmet.com Newsgroups: comp.lang.ada Subject: Re: ADA Compiling Query Message-ID: <20600085@inmet> Date: 18 Feb 91 14:33:00 GMT References: <5572@baird.cs.strath.ac.uk> Nf-ID: #R:baird.cs.strath.ac.uk:5572:inmet:20600085:000:1265 Nf-From: inmet.inmet.com!stt Feb 18 09:33:00 1991 List-Id: 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