From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Inherited Methods and such
Date: Fri, 28 Sep 2007 15:12:51 -0400
Date: 2007-09-28T15:12:51-04:00 [thread overview]
Message-ID: <wcclkaqfvt8.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1190928238.269866.53270@o80g2000hse.googlegroups.com
Maciej Sobczak <see.my.homepage@gmail.com> writes:
> On 27 Wrz, 15:39, Robert A Duff <bobd...@shell01.TheWorld.com> wrote:
>> But I find the C++ solution less than ideal -- the programmer might well
>> expect to dispatch to the deeper type, and be surprised when it doesn't.
>
> Of course. I can assure you that this question is quite regular and
> even has its own FAQ entry:
>
> http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.5
>
>> Question: why do you want to dispatch at all during construction?
>
> I don't.
OK, good. So neither C++ nor Ada is ideal here, because both allow
dispatching during construction. (And for Initialize, Ada is arguably
worse than C++, since it allows dispatching to the deeper type.)
> Yes, but this was taken out of some fragment of this lengthy
> discussion. Registration requires that T'Class is available in the
> base type constructor.
>
> So - even if I don't need to dispatch, I might need T'Class.
Interesting. I'm not sure what the best language design would be, for
this sort of thing.
>> In other words, would you be happy with a rule saying you can't dispatch
>> during construction?
>
> I would be perfectly fine with this rule, but having this rule *and*
> access to T'Class are not much compatible with each other.
Indeed.
>... How can you
> prevent me from dispatching if I already have T'Class? With runtime
> checks, perhaps?
In the Ada context, a run-time check is the only way I can think of.
- Bob
next prev parent reply other threads:[~2007-09-28 19:12 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 14:26 Inherited Methods and such shaunpatterson
2007-09-17 15:11 ` Ludovic Brenta
2007-09-17 16:46 ` shaunpatterson
2007-09-17 19:07 ` Ludovic Brenta
2007-09-17 20:22 ` Maciej Sobczak
2007-09-17 21:07 ` Ludovic Brenta
2007-09-18 14:27 ` Maciej Sobczak
2007-09-18 14:27 ` Maciej Sobczak
2007-09-18 15:25 ` Dmitry A. Kazakov
2007-09-18 18:34 ` Ludovic Brenta
2007-09-18 19:29 ` Dmitry A. Kazakov
2007-09-18 19:39 ` Ludovic Brenta
2007-09-18 20:49 ` Dmitry A. Kazakov
2007-09-18 21:10 ` Simon Wright
2007-09-18 20:39 ` Maciej Sobczak
2007-09-18 21:12 ` Dmitry A. Kazakov
2007-09-19 14:49 ` Maciej Sobczak
2007-09-19 15:16 ` Dmitry A. Kazakov
2007-09-19 22:13 ` Maciej Sobczak
2007-09-20 8:12 ` Dmitry A. Kazakov
2007-09-20 13:52 ` Maciej Sobczak
2007-09-20 16:22 ` Dmitry A. Kazakov
2007-09-20 20:45 ` Maciej Sobczak
2007-09-21 18:59 ` Dmitry A. Kazakov
2007-09-21 21:02 ` Maciej Sobczak
2007-09-22 8:48 ` Dmitry A. Kazakov
2007-09-22 21:53 ` Maciej Sobczak
2007-09-23 8:41 ` Dmitry A. Kazakov
2007-09-23 20:36 ` Maciej Sobczak
2007-09-24 9:32 ` Dmitry A. Kazakov
2007-09-24 15:02 ` Maciej Sobczak
2007-09-24 19:20 ` Dmitry A. Kazakov
2007-09-25 20:53 ` Maciej Sobczak
2007-09-26 10:42 ` Dmitry A. Kazakov
2007-09-26 21:31 ` Maciej Sobczak
2007-09-27 15:02 ` Dmitry A. Kazakov
2007-09-27 21:02 ` Maciej Sobczak
2007-09-26 12:21 ` Robert A Duff
2007-09-26 12:54 ` Dmitry A. Kazakov
2007-09-26 21:37 ` Maciej Sobczak
2007-09-26 23:47 ` Randy Brukardt
2007-09-27 21:08 ` Maciej Sobczak
2007-09-28 0:44 ` Randy Brukardt
2007-09-28 20:32 ` Maciej Sobczak
2007-09-28 22:35 ` Randy Brukardt
2007-09-29 23:58 ` Robert A Duff
2007-09-26 12:26 ` Robert A Duff
2007-09-26 21:50 ` Maciej Sobczak
2007-09-26 22:20 ` Ray Blaak
2007-09-27 0:01 ` Randy Brukardt
2007-09-27 13:39 ` Robert A Duff
2007-09-27 14:54 ` Dmitry A. Kazakov
2007-09-28 0:35 ` Randy Brukardt
[not found] ` <7p6gc1s9imfa$.kmvwf5zyf8e9.dlg@40tude.net>
2007-09-28 22:53 ` Randy Brukardt
2007-09-29 20:37 ` Dmitry A. Kazakov
2007-09-27 21:23 ` Maciej Sobczak
2007-09-28 19:12 ` Robert A Duff [this message]
2007-09-28 19:02 ` Robert A Duff
2007-09-28 19:42 ` Robert A Duff
2007-09-28 20:44 ` Maciej Sobczak
2007-09-28 22:40 ` Randy Brukardt
2007-09-29 20:35 ` Dmitry A. Kazakov
2007-09-29 20:52 ` Maciej Sobczak
2007-09-30 8:38 ` Dmitry A. Kazakov
2007-09-29 23:47 ` Robert A Duff
2007-09-29 20:48 ` Maciej Sobczak
2007-09-29 23:39 ` Robert A Duff
2007-09-30 8:38 ` Dmitry A. Kazakov
2007-09-29 23:42 ` Robert A Duff
2007-09-25 1:59 ` Randy Brukardt
2007-09-25 8:59 ` Dmitry A. Kazakov
2007-09-25 21:02 ` Randy Brukardt
2007-09-26 12:42 ` Dmitry A. Kazakov
2007-09-18 4:03 ` Steve
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox