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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2def9aa85afa5d22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-29 09:35:17 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Joint Strike Fighter Date: Thu, 29 Nov 2001 12:12:13 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9u5q9g$md$1@nh.pace.co.uk> References: <3BDCE159.39F6D422@adaworks.com> <11bf7180.0110290311.4d8d6f04@posting.google.com> <3BDF9C6A.C25520C5@adaworks.com> <3BE023AB.8F235EF5@sparc01.ftw.rsc.raytheon.com> <9rp8mo$6d8$1@nh.pace.co.uk> <11bf7180.0111010338.6dbc1537@posting.google.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1007053936 717 136.170.200.133 (29 Nov 2001 17:12:16 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 29 Nov 2001 17:12:16 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:17172 Date: 2001-11-29T17:12:16+00:00 List-Id: This seems to be a very common misconception about Ada that tends to come from C/C++ programmers approaching the language for the first time. Clearly, many programmers are simply used to having to do something explicit to get pass-by-reference and think it won't happen unless they make it so. I have encountered this misconception often when teaching Ada. I don't know what could be done with teaching materials, reference documents or the language itself to make it more clear that the compiler will handle this for you and won't do something stupid. It just seems to occur over and over again and Ada gets a bad name over something that is just being misunderstood. It would be good to have something about this in the FAQ. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Matthew Heaney" wrote in message news:u0cpfi8hvh7jca@corp.supernews.com... > > I wanted to mention that the speaker at this session seemed not to realize > that tagged types in Ada95 are automatically passed by reference. He seemed > to think that tagged types were passed by value, and that steps would need > to be taken by the programmer to prevent this. > > What they were doing on the project as a "fix" was to pass tagged objects by > reference explicitly, using named access types. But this caused problems > wrt accessibility rules. But none of this was necessary, because tagged > types are automatically passed by reference in Ada95. > > Limited types whose full view is limited are also passed by reference. > > > >