Forwarding accidentally privatized message to the list.

---------- Forwarded message ---------
From: John Cowan <xxxxxx@ccil.org>
Date: Wed, Jul 3, 2019 at 8:42 AM
Subject: Re: Undefined behavior
To: Marc Nieper-Wi?kirchen <xxxxxx@nieper-wisskirchen.de>




On Wed, Jul 3, 2019 at 1:50 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

I think one has to be a bit more careful: Various procedures included in the SRFI 172 libraries can trigger the "it is an error" condition when, say, being passed incompatible values. Evaluating Scheme code that "it is an error" is no more safe than C code that causes "undefined behavior", which means it is not all safe:

While this comparison is correct in principle, it is mostly not true in practice.  I know of no Scheme compiler whatever that generates unsafe code *by default*, whereas C compilers almost always do.  Indeed, the only currently working C compiler I know that does generate safe code is Vacietis <https://github.com/vsedach/Vacietis>, which compiles C into Common Lisp.  Of course, the resulting code must not itself be compiled unsafely, but Common Lisp has the same culture of safety-by-default as Scheme.  I will mention the question of "is an error" in the next draft, however.

https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/ItIsAnError.md is a list of explicit "is an error" references in R7RS-small, but of course it is not exhaustive.


John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Some people open all the Windows; wise wives welcome the spring by moving
the Unix.  --Advertisement for Unix Book Units (U.K.)
(see https://9p.io/who/dmr/unix3image.gif)