comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: pointers & OOP
Date: 1999/05/01
Date: 1999-05-01T00:00:00+00:00	[thread overview]
Message-ID: <m3g15gzbx6.fsf@mheaney.ni.net> (raw)
In-Reply-To: m3k8uszln5.fsf@mheaney.ni.net

Matthew Heaney <matthew_heaney@acm.org> writes:

> John Robinson <john@jr-and-assoc.demon.co.uk> writes:
> 
> > Any collection class for example will need to use pointers, even if
> > the collection is based around a fixed length array.  
> 
> Yes, a collection whose items have a class-wide type will require
> pointer use.  But you can use a smart pointer, so you don't have to
> worry about any pointer manipulation headaches.  Gives you the same as a
> reference in other OO languages.

I should also have mentioned that when you declare the primitive
operations of the type to take access parameters, this effectively hides
the fact that you manipulating a pointer.  The syntax of method
invokation is the same as for a non-pointer.


> For some ideas on smart pointers, how to control instance creation, etc,
> peruse the articles (mostly Oct/Nov 98 to the present) in the Ada95
> design patterns archive at the ACM.
> 
> <http://www.acm.org/archives/patterns.html>

The ACM patterns archives also has lots of examples of the access
parameter technique.

Matt







  reply	other threads:[~1999-05-01  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-01  0:00 pointers & OOP Matthew Heaney
1999-05-01  0:00 ` Matthew Heaney [this message]
1999-05-03  0:00 ` John Robinson
1999-05-03  0:00   ` Samuel Mize
1999-05-04  0:00     ` Robert Dewar
1999-05-04  0:00     ` Martin C. Carlisle
1999-05-04  0:00   ` Robert Dewar
1999-05-04  0:00     ` Mike Silva
1999-05-05  0:00     ` John Robinson
1999-05-05  0:00       ` Robert Dewar
1999-05-05  0:00         ` John Robinson
1999-05-06  0:00           ` Brian Rogoff
1999-05-07  0:00             ` dennison
1999-05-07  0:00               ` Brian Rogoff
1999-05-10  0:00                 ` dennison
1999-05-11  0:00                   ` Jean-Pierre Rosen
1999-05-11  0:00                     ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00               ` Matthew Heaney
1999-05-14  0:00                 ` David Botton
1999-05-14  0:00           ` Matthew Heaney
1999-05-14  0:00             ` Ed Falis
1999-05-05  0:00       ` Matthew Heaney
1999-05-05  0:00       ` Robert Dewar
1999-05-08  0:00         ` Ehud Lamm
1999-05-06  0:00       ` Simon Wright
1999-05-06  0:00         ` John Robinson
1999-05-08  0:00           ` Simon Wright
1999-05-10  0:00             ` John Robinson
1999-05-06  0:00       ` Tom Moran
1999-05-06  0:00         ` John Robinson
1999-05-06  0:00           ` Tom Moran
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00         ` Matthew Heaney
1999-05-05  0:00     ` Francois Godme
  -- strict thread matches above, loose matches on Subject: below --
1999-05-01  0:00 Tom Moran
replies disabled

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