comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <MrNoSpam@bigpoop.net.au>
Subject: Re: issue with implementing a visitor design pattern
Date: Sat, 24 Jan 2004 20:38:14 GMT
Date: 2004-01-24T20:38:14+00:00	[thread overview]
Message-ID: <MrNoSpam-AA0930.07381425012004@news-server.bigpond.net.au> (raw)
In-Reply-To: wccr7xyfeu3.fsf@shell01.TheWorld.com

Robert A Duff wrote:

> "Robert I. Eachus" <rieachus@comcast.net> writes:
> 
> > The much deeper problem you have is that the Visitor pattern is a waste
> > of effort in Ada.  Not wrong, or unimplementable, but the pattern as
> > such is much heavier weight than it needs to be.
> 
> I agree.  In fact, I'd say "visitor" is my least favorite design pattern
> of the ones in the Gamma et al book.  "Visitor" has all the
> disadvantages of a case statement (over dispatching calls),
> with none of the advantages!

If you have two orthoganal classifications (object and function) and
you need to (effectively) double dispatch, the visitor pattern is 
quite useful. Not quite sure how else you would achieve it in Ada.

Dale

-- 
dstanbro@spam.o.matic.bigpond.net.au



  reply	other threads:[~2004-01-24 20:38 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 [this message]
2004-01-24 21:44       ` Robert A Duff
2004-01-26  8:34         ` Dmitry A. Kazakov
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