comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Parameter Modes, In In Out and Out
Date: Sat, 13 Jan 2001 22:32:55 GMT
Date: 2001-01-13T22:32:55+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0101131407170.18026-100000@shell5.ba.best.com> (raw)
In-Reply-To: <93q6cd$r3k$1@nnrp1.deja.com>

On Sat, 13 Jan 2001, Robert Dewar wrote:
> dmitry6243@my-deja.com wrote:
> > You surely do not think that I am able to produce a complete
> > proposal, how to incorporate MD in Ada (:-)).
> 
> On the contrary, I assume that if you are arguing this point,
> you understand both Ada and MD well enough to do exactly that,
> and for instance that you are familiar with CLOS. It is really
> not that hard to propose the basic outline of an MD facility
> for Ada 83, we sketched out various ideas during the design
> process, but nothing that was reasonable.
> 
> Now if your emphasis is on *complete* here, i.e. with all the
> details of semantic interactions worked out, then that
> statement makes sense, but we don't need to go there to
> discuss whether MD is useful. Just sketch out what MD would
> mean to you in an Ada environment, and produce an example,
> showing what you would like to be able to write.

I'd like to be able to write something like 

package Shape_Output is 
    type Shape_Type is tagged private;
    ...
    type Output_Type is tagged limited private;

    procedure Write(Shape : in Shape_Type; Output in out Output_Type);
private
    ...
end Shape_Output;

where write is a primitive operation of Shape_Type and Output_Type and 
the dispatching can select based on both which code gets called. :-)

> If you can't get this far, then there is no point in even
> discussing what the details are.

Is that far enough? 

Before anyone answers, I'm familiar with the double dispatching idiom, and
the Visitor pattern, and Dylan, and I actually believe the designers of
Ada were right not to provide direct support for this in Ada given what we
currently know.

I also think that some form of downward funarg would be a lot more useful
in day-to-day programming than multimethods, though I guess I wouldn't
call Ada crippled or hobbled. I'd just say that it's an annoyance that I 
wish wasn't there. (Sorry, couldn't resist :)

> I am beginning to worry that you are promoting MD without a
> clear idea of how it would work, or how it would be used,
> just on the basis of some vague theoretical understanding.

From my POV, its clear that it could be useful, but when you think about
how it should work and how to implement it in Ada you start wondering 
about the gain. 

> > > To make your case, why not do the following
> > >
> > >   a) propose, in rough form, no need to tie up the details
> > >   an MD addition to Ada
> > >
> > >   b) show one example where this MD addition really adds
> > >   to expressive power.
> > >
> > > I think that's a reasonable request, the burden of proof is
> > > definitely on your side for adding new features. What is
> > > interesting then is to contrast the best possible solution
> > > without MD to the example you show.

How is the example of object IO above? I think you can generalize that 
to lots of similar cases. What I'm really curious about is how many 
good, natural examples of MM use more than two dispatching arguments. 
Anyone have a good one? 

> I assume you are familiar with Tucker's proposal in this
> area (the above seems a bit rambling to me, I really can't
> tell what you mean). Tucker's proposal seems exactly the
> right direction to follow if you want to pursue MI.

Yes, Tucker's note on adding Java style interfaces is really worth a read, 
and I'd advise anyone who wants to contribute their two cents to Ada 0X 
language design discussions to just read that, and also Tucker's proposal 
about blending protected types and tagged types better. 

And I guess it goes without saying that I hope GNAT is quick to implement
some of these ideas...

-- Brian





  reply	other threads:[~2001-01-13 22:32 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06  0:11 Parameter Modes, In In Out and Out i.a.mcleod
2001-01-06  4:58 ` tmoran
2001-01-06 17:06   ` Robert Dewar
2001-01-06 19:50     ` tmoran
2001-01-06 20:31       ` Robert Dewar
2001-01-07  1:59     ` John English
2001-01-07  3:51       ` Robert Dewar
2001-01-08 12:06         ` dmitry6243
2001-01-09  4:32           ` Robert Dewar
2001-01-09 10:05             ` dmitry6243
2001-01-09  4:35           ` Robert Dewar
2001-01-09  9:58             ` dmitry6243
2001-01-09 14:13               ` Robert Dewar
2001-01-09 18:29                 ` dmitry6243
2001-01-09 19:55                   ` Robert Dewar
2001-01-10  0:47                     ` Brian Rogoff
2001-01-10 21:50                       ` Robert Dewar
2001-01-10  9:23                     ` dmitry6243
2001-01-10 21:46                       ` Robert Dewar
2001-01-11 11:46                         ` dmitry6243
2001-01-11 16:48                           ` Robert Dewar
2001-01-11 19:52                             ` Thierry Lelegard
2001-01-11 20:10                               ` Pascal Obry
2001-01-12  8:05                                 ` Florian Weimer
2001-01-12 13:31                               ` gasperon
2001-01-12 14:02                                 ` n_brunot
2001-01-12 17:26                                   ` charlet
2001-01-14 18:23                                     ` n_brunot
2001-01-14 21:05                                       ` Robert Dewar
2001-01-15  8:56                                         ` n_brunot
2001-01-12 11:05                             ` dmitry6243
2001-01-12 13:55                               ` Robert Dewar
2001-01-12 22:10                                 ` Dale Stanbrough
2001-01-13  1:13                                   ` Robert Dewar
2001-01-13 17:29                                 ` dmitry6243
2001-01-13 18:22                                   ` Robert Dewar
2001-01-13 22:32                                     ` Brian Rogoff [this message]
2001-01-14  6:02                                       ` Jeffrey Carter
2001-01-14 14:33                                         ` Robert Dewar
2001-01-14 18:14                                           ` Jeffrey Carter
2001-01-14 21:10                                             ` Robert Dewar
2001-01-14 20:45                                         ` Brian Rogoff
2001-01-14 14:23                                       ` Robert Dewar
2001-01-14 20:42                                         ` Brian Rogoff
2001-01-14 21:17                                           ` Robert Dewar
2001-01-15 20:57                                             ` Brian Rogoff
2001-01-15 16:25                                     ` dmitry6243
2001-02-02  7:06                                       ` Multiple dispatch (was " mark_lundquist
2001-02-02 13:49                                         ` dmitry6243
2001-01-16 12:22                                 ` Georg Bauhaus
2001-01-13  4:46                           ` Larry Kilgallen
     [not found]                           ` <93ko49$auq$1@nnrp1.deja.coOrganization: LJK Software <eiviJtYj+A7W@eisner.decus.org>
2001-01-13  6:00                             ` Robert Dewar
2001-01-11 21:38               ` mark_lundquist
2001-01-12  0:20                 ` John English
2001-01-12 13:57                   ` Robert Dewar
2001-01-12 20:34                     ` mark_lundquist
2001-01-13 18:06                       ` Brian Rogoff
2001-01-11 21:28             ` mark_lundquist
2001-01-12 12:35               ` dmitry6243
2001-01-12 21:22                 ` mark_lundquist
2001-01-13  1:16                   ` Robert Dewar
2001-02-02  5:42                     ` mark_lundquist
2001-02-02 14:55                       ` Stephen Leake
2001-02-02 20:08                         ` Robert Dewar
2001-02-05 15:00                           ` Stephen Leake
2001-01-13 21:26               ` Jean-Pierre Rosen
2001-01-11 21:24           ` mark_lundquist
2001-01-12 12:13             ` dmitry6243
2001-01-06 16:21 ` Jean-Pierre Rosen
2001-01-09 15:15   ` Thierry Lelegard
2001-01-10 21:53     ` Robert Dewar
2001-01-07 19:15 ` DuckE
2001-01-09 20:44 ` Laurent Guerby
2001-01-09 21:46   ` Florian Weimer
2001-01-10 21:57   ` Robert Dewar
2001-01-10 23:51     ` Tucker Taft
2001-01-11  4:23       ` Robert Dewar
2001-01-11 19:28     ` Laurent Guerby
2001-01-18 18:53 ` FAROOQATIF
replies disabled

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