comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Pop function
Date: Thu, 15 Dec 2011 09:38:48 +0100
Date: 2011-12-15T09:38:48+01:00	[thread overview]
Message-ID: <xur5cpym0nio$.sn78819v5iki$.dlg@40tude.net> (raw)
In-Reply-To: jcbfbi$rql$1@adenine.netfront.net

On Wed, 14 Dec 2011 17:34:57 -0700, Jeffrey Carter wrote:

> Your public interface should never use access types.

Yes, but since list as a data structure has the semantics of objects
accessed by references it would make sense to have this reflected in the
interface. But of course the list element must be

   type List_Item is access Integer; -- Only the data, no other mess

Fortunately Ada supports such implementations (via storage pools).

Otherwise, it is not a list what OP wants, but rather a container, e.g.
set, bag, maybe an array (map).

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2011-12-15  8:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15  0:06 Pop function Rego, P.
2011-12-15  0:29 ` Martin Dowie
2011-12-15  1:23   ` Rego, P.
2011-12-15  2:08   ` Adam Beneschan
2011-12-15 22:59     ` Martin Dowie
2011-12-16 10:27       ` georg bauhaus
2011-12-15  0:34 ` Jeffrey Carter
2011-12-15  1:35   ` Rego, P.
2011-12-15  2:55     ` Alex Mentis
2011-12-15  3:00       ` Alex Mentis
2011-12-15  3:00     ` Jeffrey Carter
2011-12-15  3:41       ` Rego, P.
2011-12-15  8:38   ` Dmitry A. Kazakov [this message]
2011-12-15 19:57     ` Jeffrey Carter
2011-12-15 20:15       ` Dmitry A. Kazakov
2011-12-15 21:02         ` Simon Wright
2011-12-15 21:25           ` Jeffrey Carter
2011-12-16  8:23           ` Dmitry A. Kazakov
2011-12-16  0:31       ` Randy Brukardt
2011-12-15  2:06 ` Adam Beneschan
2011-12-15  3:27   ` Rego, P.
2011-12-15 12:43     ` Simon Wright
2011-12-15 15:54       ` Adam Beneschan
2011-12-15 18:34         ` Simon Wright
2011-12-15 19:14           ` Dmitry A. Kazakov
2011-12-15 16:14     ` Adam Beneschan
2011-12-28 13:04       ` Rego, P.
replies disabled

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