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: Mon, 15 Jan 2001 20:57:02 GMT
Date: 2001-01-15T20:57:02+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0101151230510.13485-100000@shell5.ba.best.com> (raw)
In-Reply-To: <93t50u$vpf$1@nnrp1.deja.com>

On Sun, 14 Jan 2001, Robert Dewar wrote:
> In article
> <Pine.BSF.4.21.0101141234130.2654-100000@shell5.ba.best.com>,
>   Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> > I'm still wondering if anyone (Dmitry?) can come up with some
> > good  (natural, commonly occurring, etc.) examples which use
> > triple or  n-tuple dispatch where n > 2. All of the examples
> > I've run into so far are double-dispatch.
> 
> Right, indeed examples would be interesting. I have been trying
> to provoke Dmitry to come up with examples, but so far without
> success :-)

I was actually of a similar disposition as Dmitry a few years ago w.r.t 
MD, but as I studied the issue more and looked at my own code in Ada and 
similar languages I managed to convince myself that it wouldn't be worth
it in Ada. Any CLOS programmers out there with different opinions? I never 
used Common Lisp enough to have it "at my fingertips" so maybe there are 
things I've missed.

I have bigger fish to fry now too. Why worry about MD when there are quite
a few aspects of protected types that need fixing? IMO, a good way to
judge if something qualifies as a potential Ada enhancement is if you have 
an actual coding experience with Ada where a (missing) feature caused pain
and the workaround was insufficient. For instance, the Rosen trick has 
lessened my pain at the lack of out params in functions so that even
though it seems naughty I won't complain about this flaw again. 

> > Well, surely you read the note about the ESA project which
> > eschewed  Ada in favor of C++ on account of the inability to
> > do Java style  MI of interface in Ada? That may not count as
> > customer demand, but  it is an interesting data point
> > nonetheless.
> 
> Well it certainly does not count as customer demand :-) As far
> as I know the ESA did not even investigate the possibility of
> whether this feature could be added to Ada (if they consider
> Java as potentially usable, then obviously language standards
> are not a consideration :-)

OK wiseguy, joke noted. They actually went with C++, and there library 
relies on conventions to restrict MI use to Java style, with pure abstract 
virtual base classes representing interfaces. 

> But more to the point, when you here someone say
> 
> I am choosing language X instead of Ada because Ada does not
> have Y.
> 
> Then it does not mean that if Ada *did* have Y, they would
> have chosen Ada.

Understood. Ada has lots of stuff C++ doesn't have. The lack of nested 
subprograms (with lexical scope) in a language is real turn-off, IMO. 

> I agree it is worth pursuing, but if the ESA is saying that
> the only way they can make their birds fly is to use Java
> style MI, then that's not very convincing!

No, I think their argument is more along the lines of "We found this 
style of OO to enhance reusability and maintainability", and expressing it
in Ada (with the self referential access discriminant trick) is a clumsy. 
For pure interface style programming, I see their point. Access discriminants 
provide a decent way to do MI of implementation (IMO) but Java style
interfaces do seem to hit a nice "sweet spot" of safe MI usage and
providing direct syntactic support for this in the language is worth
looking at. 

You're probably right that a preprocessor which deals with the clunky 
access discriminant stuff is a better fast track to a prototype than 
modifying GNAT. 

-- Brian





  reply	other threads:[~2001-01-15 20:57 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
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 [this message]
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