From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Run-time accessibility checks
Date: Sun, 7 Dec 2008 09:44:13 +0100
Date: 2008-12-07T09:44:15+01:00 [thread overview]
Message-ID: <ggyyafzb06rk.1fkbqhnepowug$.dlg@40tude.net> (raw)
In-Reply-To: 68719e0e-af31-488a-b45c-f8db93fb70d2@v13g2000yqm.googlegroups.com
On Sat, 6 Dec 2008 09:10:49 -0800 (PST), Ludovic Brenta wrote:
> Dmitry A. Kazakov wrote:
>> It is absolutely unacceptable to me that a correct
>> program might fail at run-time because of accessibility checks.
>
> I differ here; to me, a program that fails an accessibility check at
> run time is incorrect.
Ah, I used to think this way too. But then I realized that this form of
constraint is not a semantic one. Comparing to the constraint range 1..10,
accessibility constraint is an implementation detail. It has no semantic
meaning. When you assign a value outside the range that is semantically
incorrect. When you assign a pointer that potentially might become
dangling, that has no semantic meaning. The pointer is not yet dangling.
The program correctness depends on whether it will become dangling.
>> The only
>> case I could buy it, if exceptions where contracted, so that I would get an
>> compile-time error at some other place. Like "Constraint_Error may be
>> propagated, but the contract states otherwise."
>
> In my understanding, there is an implicit contract stating that all
> subprograms may raise at least Program_Error, Storage_Error or
> Constraint_Error.
That must be changed.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2008-12-07 8:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 10:15 Run-time accessibility checks (was: Construction initialization problem) Dmitry A. Kazakov
2008-12-06 17:10 ` Ludovic Brenta
2008-12-07 8:44 ` Dmitry A. Kazakov [this message]
2008-12-07 14:56 ` Run-time accessibility checks Ludovic Brenta
2008-12-07 19:22 ` Dmitry A. Kazakov
2008-12-11 1:03 ` Randy Brukardt
2008-12-11 9:08 ` Dmitry A. Kazakov
2008-12-11 0:55 ` Run-time accessibility checks (was: Construction initialization problem) Randy Brukardt
2008-12-11 9:48 ` Run-time accessibility checks Dmitry A. Kazakov
2008-12-11 11:21 ` Georg Bauhaus
2008-12-11 11:40 ` Dmitry A. Kazakov
2008-12-11 22:15 ` Run-time accessibility checks (was: Construction initialization problem) Randy Brukardt
2008-12-11 22:31 ` Randy Brukardt
2008-12-13 0:49 ` Randy Brukardt
2008-12-13 9:06 ` Run-time accessibility checks Dmitry A. Kazakov
2008-12-16 1:53 ` Randy Brukardt
2008-12-16 9:28 ` Dmitry A. Kazakov
2008-12-16 22:21 ` Randy Brukardt
2008-12-17 8:54 ` Dmitry A. Kazakov
2008-12-12 9:21 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox