comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: issue with implementing a visitor design pattern
Date: Mon, 26 Jan 2004 09:34:28 +0100
Date: 2004-01-26T09:34:28+01:00	[thread overview]
Message-ID: <sjj910dp4afg8eprr0is06943dgp2cphh6@4ax.com> (raw)
In-Reply-To: wcc4qult42l.fsf@shell01.TheWorld.com

On 24 Jan 2004 16:44:02 -0500, Robert A Duff
<bobduff@shell01.TheWorld.com> wrote:

>Dale Stanbrough <MrNoSpam@bigpoop.net.au> writes:
>
>> Robert A Duff wrote:

>Adding "case on 'Tag" to Ada would not be trivial.  One would have to
>reconcile the open-ended type extension capability of tagged types with
>the full-coverage rules of case statements.

Same as with integer types, an obligatory:

   when others =>
      ...

Then, of course, there could be subtypes of classes and thus finite
sets of tags:

type T is tagged ...;
type T1 is new T with ...;
type T2 is new T1 with ...;
...
type TN is new ...;

subtype Finite is T'Class (T1..TN);

Also useful would be dispatching on bare tags or an equivalent of
that.

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



  reply	other threads:[~2004-01-26  8:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15 19:22 issue with implementing a visitor design pattern cl1
2004-01-17  3:41 ` Robert I. Eachus
2004-01-17 21:24   ` Robert A Duff
2004-01-24 20:38     ` Dale Stanbrough
2004-01-24 21:44       ` Robert A Duff
2004-01-26  8:34         ` Dmitry A. Kazakov [this message]
2004-01-26 20:18           ` Robert A Duff
2004-01-27  8:36             ` Dmitry A. Kazakov
2004-02-01  0:32               ` Georg Bauhaus
2004-01-17 23:05   ` cl1
replies disabled

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