comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Simple Components (Generic_Directed_Graph)
Date: Mon, 30 Oct 2017 12:34:35 +0100
Date: 2017-10-30T12:34:35+01:00	[thread overview]
Message-ID: <ot72oa$1tto$1@gioia.aioe.org> (raw)
In-Reply-To: ot70ve$1qjp$1@gioia.aioe.org

On 2017-10-30 12:04, Victor Porton wrote:

> It is in principle possible to represent an object as an internal state of a
> package.

If object supposed to have a type, then no, Ada packages have no types.

> But this isn't the intended usage. And actually it is not suitable
> in some situations, such as dynamic memory allocation or an array of graphs.

Node = graph. Node type is scalar. You can allocate it, have arrays of, 
whatever you like keeping in mind that it is an access type.

Compare it to Ada task or file types. You can allocate tasks, you can 
have arrays of tasks, but remember that these are only proxy objects to 
some other entities.

> So why did you do this? Shouldn't you rethink your design?

That depends on the use case you have in mind.

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

  reply	other threads:[~2017-10-30 11:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 10:41 Simple Components (Generic_Directed_Graph) Victor Porton
2017-10-30 11:04 ` Victor Porton
2017-10-30 11:34   ` Dmitry A. Kazakov [this message]
2017-10-30 11:23 ` Dmitry A. Kazakov
2017-10-30 14:58   ` Victor Porton
2017-10-30 15:46     ` Dmitry A. Kazakov
2017-10-30 17:46       ` Dennis Lee Bieber
2017-10-30 20:29         ` Dmitry A. Kazakov
2017-10-30 15:13   ` Victor Porton
2017-10-30 15:54     ` Dmitry A. Kazakov
2017-10-30 18:30   ` Victor Porton
2017-10-30 20:43     ` Dmitry A. Kazakov
2017-10-30 21:20       ` Victor Porton
2017-10-30 22:39         ` Dmitry A. Kazakov
2017-10-31  7:36           ` Simon Wright
2017-10-31  8:16             ` Dmitry A. Kazakov
2017-10-31 11:12           ` Victor Porton
2017-10-31 12:42             ` Dmitry A. Kazakov
2017-10-31 15:07               ` Victor Porton
2017-10-31 15:48                 ` Dmitry A. Kazakov
replies disabled

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