From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: overriding in private part
Date: Fri, 03 Oct 2008 16:29:21 -0400
Date: 2008-10-03T16:29:21-04:00 [thread overview]
Message-ID: <wcc1vyxwhge.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: bbd02ce6-572f-4af0-9284-228c71c95e0d@d70g2000hsc.googlegroups.com
Adam Beneschan <adam@irvine.com> writes:
> I shouldn't have said "solve". It *partially* solves the problem, in
> that if the programmers use "overriding" and "not overriding"
> consistently on everything, it won't let you write a program that has
> an unexpected result of the sort Maxim ran into.
I think you should say "overriding" wherever it's legal,
but never say "not overriding". And use a compiler that
warns on missing "overriding" -- such as a recent GNAT
with the -gnatyO switch.
I agree that in the OP's example, P2 should be overriding -- this is a
language design flaw. But at least you won't get in trouble at
run time, if you follow the above convention.
- Bob
next prev parent reply other threads:[~2008-10-03 20:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 15:49 overriding in private part Maxim Reznik
2008-10-02 16:42 ` Adam Beneschan
2008-10-03 8:52 ` Dmitry A. Kazakov
2008-10-03 15:54 ` Adam Beneschan
2008-10-03 20:29 ` Robert A Duff [this message]
2008-10-04 2:28 ` Randy Brukardt
2008-10-04 19:47 ` Robert A Duff
2008-10-05 7:35 ` Dmitry A. Kazakov
2008-10-05 19:57 ` Robert A Duff
2008-10-06 8:50 ` Dmitry A. Kazakov
2008-10-06 23:32 ` Randy Brukardt
2008-10-05 11:46 ` stefan-lucks
2008-10-05 20:08 ` Robert A Duff
2008-10-06 23:39 ` Randy Brukardt
2008-10-02 23:17 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox