comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: How do I create an object instance from a tag?
Date: Wed, 19 Feb 2003 14:26:36 +0100
Date: 2003-02-19T14:26:36+01:00	[thread overview]
Message-ID: <hou65vklhn0burniq4ds2h8feipo6m7su4@4ax.com> (raw)
In-Reply-To: mailman.20.1045648099.9948.comp.lang.ada@ada.eu.org

On Wed, 19 Feb 2003 10:39:56 +0100 (MET), "Grein, Christoph"
<christoph.grein@eurocopter.com> wrote:

>Problem with this proposal is abstract types. There must not be objects of an 
>abstract type.
>
>So if myTag denotes an abstract type, the proposal is illegal. It should at 
>least propagate Program_Error.

Constraint_Error, I would say. It is statically uncheckable. BTW, the
source of the problem with it is that S'Tag "leaks". IMO there is no
much sense in having tags of imaginary objects. So S'Tag could raise
an exception if S is abstract (or unconstrained?).

>So there are good reasons why there is not yet a solution for this problem.

Similar problem exists with S'Class'Input, if you mangle stream data
so that an abstract type tag appears there.

>(A solution, together with some trivial other amendments, could be used to find 
>the nearest common ancestor of two tagged objects. Currently there is no way to 
>find it.)

I do not see it as the same problem. Are there many cases where the
above could be useful? Sort of MD for poor? (:-))

Tag comparisons (>, >=, <, <=) could be indeed useful.

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



  reply	other threads:[~2003-02-19 13:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19  9:39 How do I create an object instance from a tag? Grein, Christoph
2003-02-19 13:26 ` Dmitry A. Kazakov [this message]
2003-02-19 18:36   ` Randy Brukardt
2003-02-20  9:15     ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2003-02-17 20:25 Steve
2003-02-18  8:29 ` Dmitry A. Kazakov
2003-02-18 18:14   ` Randy Brukardt
2003-02-19  2:27     ` Steve
2003-02-19  9:18       ` Dmitry A. Kazakov
2003-02-20 15:38 ` Julio Cano
replies disabled

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