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: bobduff@world.std.com (Robert A Duff) Subject: Re: Call by reference vs. call by value Date: 1996/07/21 Message-ID: #1/1 X-Deja-AN: 169345876 references: <31F10E50.726@egr.uri.edu> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: In article <31F10E50.726@egr.uri.edu>, Christopher Felaco wrote: >My reasons for posting this are twofold. The first reason is to verify >that this is correct, ... It is. >... and see if anyone else has been bitten by this >particular undefined behavior. Yes, they have. >... The second reason is to express some >disappointment. I agree. Making this implementation dependent is bad language design, IMHO. However, your suggested solution -- to always pass 'in' parameters by reference -- is unacceptable from an efficiency point of view. It means you would have to copy huge amounts of data around when passing arrays from one procedure to another to another to another. It seems to me that a language can be designed so as to avoid the problem you are complaining about, while still retaining the desirable efficiency. But it wouldn't be Ada. - Bob