comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Re: tagged record child: override constructor?
Date: Thu, 15 Sep 2005 15:45:46 +0200
Date: 2005-09-15T15:45:46+02:00	[thread overview]
Message-ID: <dgbtu9$gco$1@sunnews.cern.ch> (raw)
In-Reply-To: <1126790380.573573.78220@g44g2000cwa.googlegroups.com>

Hyman Rosen wrote:

>>It is 100% safe, intuitive and unambiguous.
> 
> It is not intuitive at all, except to people whose intuition has
> been warped. It's just plain wrong.

I agree with this.
It can be instructive to see how it is done in other languages which 
claim to support OO. Any examples supporting the "Ada way"?
If there are not many, then claiming that the whole world got it wrong 
whereas Ada got it right does not help, especially those who are 
learning or evaluating languages.

For me it is clear in C++ that whenever I call a function which is 
virtual I should expect dynamic dispatch if the call is made through the 
pointer or reference to the base class. If I want to suppress this 
behaviour, I still can (obj.Base::fun()), which means that the element 
of control is there and I can take advantage of it when it is what is 
really needed. It is the question of what is the default that we get 
implicitly. For me, the default in C++ is correct, because it is 
consistent with what I understand by dynamic polymorphism.
Note also that in C++ there is something like slicing, which actually 
"deprives" the object from its inherited properties, but people early 
learn to avoid it - for a reason.


-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



  reply	other threads:[~2005-09-15 13:45 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
2005-09-15 13:19                           ` Hyman Rosen
2005-09-15 13:45                             ` Maciej Sobczak [this message]
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