comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: Pointer function parameter
Date: 2000/10/19
Date: 2000-10-19T12:40:05+00:00	[thread overview]
Message-ID: <39EEEBA3.5F77D257@acm.org> (raw)
In-Reply-To: Pine.LNX.4.10.10010191126450.17222-100000@lexis.di.fct.unl.pt

While there are a lot of uses for access types, what needs to be carefully
explained to the C programmer approaching Ada is that in Ada you need
access/address a WHOLE*LOT*LESS than you do in C. C programmers will typically
start trying to write Ada code with C semantics and instead of "in out"
parameters, will start passing 'Address or 'Access of everything to
everything. I've seen it done. Its not pretty. It would be instructive to the
C programmer approaching Ada to observe very vigorously that while Ada has the
means to get pointers to everything, that doesn't mean one should do so with
the same regularity one might in C.

MDC



Mario Amado Alves wrote:

> And surely there is a _lot_ of uses of access types besides interfacing to
> C: virtually all dynamic data structures (linked lists, trees, etc.)
> require them.

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






  parent reply	other threads:[~2000-10-19  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-19  0:00 Pointer function parameter Mario Amado Alves
2000-10-19  0:00 ` tmoran
2000-10-19  0:00   ` Ted Dennison
2000-10-21  0:00   ` Robert Dewar
2000-10-23  0:00     ` Alejandro Villanueva
2000-10-24  0:00       ` Robert A Duff
2000-10-24  0:00         ` Alejandro Villanueva
2000-10-24  0:00           ` Ted Dennison
2000-10-24  0:00             ` Lutz Donnerhacke
2000-10-24 22:32           ` Mats Weber
2000-10-30 15:24           ` Robert A Duff
2000-10-30 15:44             ` Ken Garlington
2000-10-30 18:53               ` Florian Weimer
2000-10-31  1:48                 ` Robert Dewar
2000-10-31 12:40                   ` Ken Garlington
2000-10-31 14:08                     ` Larry Kilgallen
2000-11-01 17:59             ` Mats Weber
2000-11-03  0:00               ` Florian Weimer
2000-11-04  0:00                 ` RAM size, was " tmoran
2000-10-19  0:00 ` Marin David Condic [this message]
2000-10-21  0:00 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-10-16  0:00 Mary
2000-10-17  0:00 ` tmoran
2000-10-17  0:00 ` Mario Amado Alves
2000-10-18  0:00   ` Robert Dewar
2000-10-18  0:00   ` Florian Weimer
2000-10-17  0:00 ` Gautier
replies disabled

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