comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: tagged record child: override constructor?
Date: Thu, 15 Sep 2005 09:31:16 +0200
Date: 2005-09-15T09:31:07+02:00	[thread overview]
Message-ID: <12v93t1k4i81i$.sm5jmg8q3lpk$.dlg@40tude.net> (raw)
In-Reply-To: 1126731371.081850.90860@g44g2000cwa.googlegroups.com

On 14 Sep 2005 13:56:11 -0700, Hyman Rosen wrote:

> Dmitry A. Kazakov wrote:
>> There is no point in adopting what other languages did wrong.
> 
> Except that Ada isn't doing things any differently than the
> other languages, it's just adopted a notation that makes it
> confusing. Ada *does* allow redispatch, type tags *are* in
> every tagged object, you *can* convert from the type to the
> classwide type, tagged objects are *always* passed by
> reference.

Ada's model is the *only* model I know which allows:

1. A universal-purpose language (like C++ or Ada) to become a pure OO
language.

2. To support multiple dispatch

3. To avoid distributed overhead

4. To create a consistent construction/destruction model

OK, these opportunities weren't used, so what?

> But where C++ and Java will make dispatching
> calls where those are indicated by the class specification,
> Ada forces the programmer to request such calls in a strange
> way at call sites, and since there's nothing syntactically
> wrong with making a non-dispatching call, the programmer won't
> notice the mistake if that request isn't made.

Which mistake? Again, it is solely the actual object's *type* which
determines dispatch. It is 100% safe, intuitive and unambiguous. Ada is a
typed language! Is C++ one?

>> As I said before, it is equivalent to dispatch that does not happen.
> 
> You may say it all you like, but my code clearly demonstrates
> that dispatching *does* happen. B::B() calls A::g()

No. It calls B::g() which was inherited from A. I don't care if code of
B::g() and A::g() share memory or not. They are different functions because
their signatures are different.

> and that dispatches to B::f().

It does not. It calls B::f() from B::g()

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2005-09-15  7:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13  5:58 tagged record child: override constructor? sean.gilbertson
2005-09-13  6:39 ` David Trudgett
2005-09-13  7:32 ` Dmitry A. Kazakov
2005-09-13  7:56   ` tmoran
2005-09-13 15:23   ` sean.gilbertson
2005-09-13 17:37     ` Martin Krischik
2005-09-13 19:29       ` Ludovic Brenta
2005-09-14  7:49         ` Dmitry A. Kazakov
2005-09-14  9:05           ` Maciej Sobczak
2005-09-14 13:20             ` Dmitry A. Kazakov
2005-09-14 13:52               ` Hyman Rosen
2005-09-14 16:47                 ` Dmitry A. Kazakov
2005-09-14 17:16                   ` Hyman Rosen
2005-09-14 20:20                     ` Dmitry A. Kazakov
2005-09-14 20:34                       ` Georg Bauhaus
2005-09-14 20:56                       ` Hyman Rosen
2005-09-15  7:31                         ` Dmitry A. Kazakov [this message]
2005-09-15 13:19                           ` Hyman Rosen
2005-09-15 13:45                             ` Maciej Sobczak
2005-09-15 17:45                             ` Dmitry A. Kazakov
2005-09-15 18:54                               ` Hyman Rosen
2005-09-16  9:32                                 ` Dmitry A. Kazakov
2005-09-16 14:52                                   ` Hyman Rosen
2005-09-16 15:33                                     ` Jean-Pierre Rosen
2005-09-16 18:37                                       ` Hyman Rosen
2005-09-16 21:03                                     ` Dmitry A. Kazakov
2005-09-16 21:33                                       ` Hyman Rosen
     [not found]                                         ` <98ox2x9xvj9z.1uh92dslhvt4g.dlg@40tude.net>
2005-09-17 12:47                                           ` Georg Bauhaus
2005-09-17 15:56                                             ` Dmitry A. Kazakov
2005-09-14 16:14           ` Martin Krischik
2005-09-14 16:57             ` Dmitry A. Kazakov
2005-09-14 18:35               ` Martin Krischik
2005-09-14  9:28         ` Alex R. Mosteo
2005-09-14 16:10         ` Martin Krischik
2005-09-13  9:33 ` Georg Bauhaus
2005-09-13 16:37 ` Jeffrey Carter
2005-09-13 18:55   ` Robert A Duff
2005-09-13 22:18     ` Jeffrey Carter
replies disabled

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