comp.lang.ada
 help / color / mirror / Atom feed
From: jls@yoda.Rational.COM (Jim Showalter)
Subject: Re: ADA Compiling Query
Date: 15 Feb 91 23:09:33 GMT	[thread overview]
Message-ID: <jls.666659373@yoda> (raw)
In-Reply-To: 2725@sparko.gwu.edu

There is an unsafe aspect of passing access types as IN parameters in Ada
that is, sad to say, handled rather better in C++.

In Ada, you can pass an access type to a function as an IN:

	type Some_Foo...

        type Pointer is access Some_Foo;

        function Some_Bar (Some_Param : in Pointer)...

And then, inside the function, dereference the pointer and modify the
pointed-to construct.

In C++, you can declare not only the pointer constant but the pointed
to construct constant as well. This allows passing by reference in a
read-only manner, which is NOT possible in Ada at present.

  reply	other threads:[~1991-02-15 23:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-02-11 15:06 ADA Compiling Query Gordon Russell
1991-02-12 19:01 ` Michael Feldman
1991-02-13 21:16 ` Jeff Bartlett
1991-02-14 16:45   ` Michael Feldman
1991-02-15 23:09     ` Jim Showalter [this message]
1991-02-17  0:19       ` Reference vs. copy semantics in passing parameters Michael Feldman
1991-02-17 18:54         ` Erland Sommarskog
1991-02-18 18:41           ` Doug Smith
1991-02-18  0:36         ` Jim Showalter
1991-02-18  1:42           ` Michael Feldman
1991-02-18 18:49           ` Arthur Evans
1991-02-19  2:05             ` Michael Feldman
1991-02-18 13:10         ` madmats
1991-02-19 19:00           ` Robert I. Eachus
1991-05-16 13:51         ` Alex Blakemore
1991-05-17  8:19           ` Matthias Ulrich Neeracher
1991-05-17 13:44           ` Markku Sakkinen
1991-05-28  5:28           ` Kenneth Almquist
1991-02-18 14:33 ` ADA Compiling Query stt
     [not found] <5572@baird.cs.strath.ac.uk#  <20600085@inmet>
1991-02-21 20:40 ` Michael Feldman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox