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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b8b8a54001adc4d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1104544963.930877.75170@c13g2000cwb.googlegroups.com> <1104595073.731663.180100@c13g2000cwb.googlegroups.com> <2J1Ed.1997$Ii4.1084@newsread3.news.pas.earthlink.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 09 Jan 2005 19:24:41 GMT NNTP-Posting-Host: 63.186.48.200 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1105298681 63.186.48.200 (Sun, 09 Jan 2005 11:24:41 PST) NNTP-Posting-Date: Sun, 09 Jan 2005 11:24:41 PST Xref: g2news1.google.com comp.lang.ada:7588 Date: 2005-01-09T19:24:41+00:00 List-Id: Robert A Duff wrote: > What rule would you prefer (in a from-scratch language design)? That's hard to tell, since I haven't really designed such a language. Perhaps simply that the rule for a private type may be different from the rule if the full type were visible. That would allow compilers to implement a private type as a secret access type, but not prevent compilers from using other approaches, such as looking at the full type in the body and using that information, or allocating objects dynamically at run time. > The main thing I dislike about the Ada rule is that it is possible to > write code by accident that behaves differently because one compiler > chooses pass-by-copy and another one pass-by-reference. And it's not > clear whose responsibility it is to worry about this kind of bug: should > procedures be written so that they work even in the presence of aliasing > among actual parameters? Or should callers avoid that aliasing? And > what can the caller know about data modified in a procedure that raised > an exception in the middle of processing? It seems pretty clear to me that it's the procedure's responsibility. Code that relies on the parameter-passing mechanism for types with an undefined mechanism has an error. -- Jeff Carter "You cheesy lot of second-hand electric donkey-bottom biters." Monty Python & the Holy Grail 14