comp.lang.ada
 help / color / mirror / Atom feed
From: mg@asp.camb.inmet.com (Mitch Gart)
Subject: Re: parameters in bindings
Date: 1996/03/26
Date: 1996-03-26T00:00:00+00:00	[thread overview]
Message-ID: <DovLGK.Cx3.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: dewar.827529457@schonberg

Robert Dewar (dewar@cs.nyu.edu) wrote:
: "This works but to me it seems ugly because extra access types are
: introduced which are otherwise unnecessary."

: That's odd, it's a bit like saying, I need some arrays, but I seem to have
: to introduce some array types which are otherwise unnecessary.

Here's a slightly different example.  Method 1 of declaring P:

    type thing is record ... end record;
    procedure P (param: access thing);
    x: aliased thing;
  begin
    p(x'access);

method 2:

    type thing is record ... end record;
    type thing_access is access all thing;
    procedure P (param: thing_access);
    x: aliased thing;
  begin
    p(x'access);

The type thing_access is an extra junk type that has no other use 
in the program.  No actual objects of type thing_access are ever
declared or used.  It is just there to allow the parameter to be
declared.  This extra type is not needed with method 1 of declaring P.

To me the declaration of thing_access is extra useless baggage.

- Mitch




  reply	other threads:[~1996-03-26  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-22  0:00 parameters in bindings Mitch Gart
1996-03-22  0:00 ` Robert Dewar
1996-03-26  0:00   ` Mitch Gart [this message]
1996-03-26  0:00     ` Robert Dewar
1996-03-23  0:00 ` Adam Beneschan
replies disabled

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