From: Simon Wright <simon@pushface.org>
Subject: Re: Implementing Rust's borrow checked pointers
Date: Tue, 24 Sep 2019 19:56:29 +0100
Date: 2019-09-24T19:56:29+01:00 [thread overview]
Message-ID: <lyk19x7cbm.fsf@pushface.org> (raw)
In-Reply-To: 5edf39fb-169a-463a-b28e-ece1d3b553e0@googlegroups.com
Lucretia <laguest9000@googlemail.com> writes:
> On Tuesday, 24 September 2019 12:23:30 UTC+1, Optikos wrote:
>
>> > begin
>> > A.all ... ; -- raises exception.
>>
>> No, to be as useful as Rust's borrow checker, instead of raising
>> exception, it needs to be a compile-time error. The compiler needs
>> to maintain a whole-program directed graph at compile-time, not
>> defer a detection-based localized analysis to run-time.
>
> Yes, the compiler would raise that exception at compile time. This
> idea that all exceptions are raised at runtime is false and you should
> check the AARM.
GNAT could (guessing here, but following the way it handles CE detected
at compile time) raise a *warning* to the effect that an exception ould
be raised at run time. And if compiling with warning => error (-gnatwe)
that would do the job. To an extent.
next prev parent reply other threads:[~2019-09-24 18:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 9:05 Implementing Rust's borrow checked pointers Lucretia
2019-09-24 9:57 ` Dmitry A. Kazakov
2019-09-24 11:23 ` Optikos
2019-09-24 12:02 ` Lucretia
2019-09-24 14:08 ` Optikos
2019-09-24 18:56 ` Simon Wright [this message]
2019-09-24 19:13 ` Keith Thompson
2019-09-24 20:15 ` Optikos
2019-09-24 20:31 ` Keith Thompson
2019-09-24 20:40 ` Optikos
2019-09-24 20:53 ` Keith Thompson
2019-09-24 22:09 ` Lucretia
2019-09-24 22:24 ` Keith Thompson
2019-09-25 4:36 ` J-P. Rosen
2019-09-25 15:04 ` Simon Wright
2019-09-24 12:23 ` Lucretia
2019-09-25 17:21 ` Stephen Leake
2019-09-24 16:24 ` Jeffrey R. Carter
2019-09-25 16:26 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox