comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: issue with implementing a visitor design pattern
Date: 26 Jan 2004 15:18:41 -0500
Date: 2004-01-26T15:18:41-05:00	[thread overview]
Message-ID: <wccllnubh0e.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: sjj910dp4afg8eprr0is06943dgp2cphh6@4ax.com

Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> writes:

> 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 =>
>       ...

"when others" *defeats* the full-coverage rules.  It should be used only
if you know it covers *all* the other cases, including the ones that
haven't been invented yet!

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

Maybe...

- Bob



  reply	other threads:[~2004-01-26 20:18 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
2004-01-26 20:18           ` Robert A Duff [this message]
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