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,8e64f4db20d57eb5 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Call by reference vs. call by value Date: 1996/07/21 Message-ID: #1/1 X-Deja-AN: 170056887 references: <31F10E50.726@egr.uri.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: Bob Duff said "P.S. In thinking about this issue, one point is that for remote procedure calls, you pretty much *have* to pass by copy, even for very large things. So a rule saying "all arrays are passed by reference" or "all arrays that are not statically known to be small are passed by reference (for some definition of small)" would break the Distributed Systems Annex." If you want to think more about this issue, worry about packed arrays too. Requiring call by reference would mean that ALL packed arrays have to be passed using general bit pointers, which would be unacceptably inefficient in the normal case where slices are not passed. Same thing for records, all records would have to be passed by bit address, just in case the record you are passing is a field in a rcord with a record rep clause. This is not an easy problem to solve -- if there were a simple solution, I think it might have been found by now, but there doesn't seem to be one.