On Tue, Jul 14, 2020 at 5:13 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

(1) If the feature identifier "debug" is present, "assume" must expand
into an equivalent "assert" form.

(2) If the feature identifiers "debug" and "ndebug" aren't present,
"assume" should report a non fulfilled assumption to the user in an
implementation-depended way.

I don't understand the point of distinguishing between "ndebug" and "(not debug)" in cond-expand or elsewhere.  In addition, the whole point of (assume (pair? x)) is that it allows the compiler to behave as if it knew that x is a pair, as by translating (car x) into (%unsafe-car x) in the same way that it can do in (if (pair? x) (car x) '()).

So -1 on this, in favor of leaving the SRFI 145 definition alone.
(3) If the feature identifier "debug" is not present but "ndebug" is,
the behavior of unfulfilled assumptions is implementation-dependent.

+1 if the words "but ndebug is" are removed.
(4) Implementations should set the feature identifier "debug" and
disable the feature identifier "ndebug" by default.

I think this is wrong even as a recommendation ("should").  In some Schemes "debug" is a proper default, in others it is not.  For example, an optimizing compiler that is normally only used after a checkout compiler (fast compile, slow execute, very debuggable) has been run should default to (not debug).
(5) Implementations should provide a way to (globally) set feature
identifiers for the use in cond-expand.

I am fine with this, but it has nothing to do with SRFI 145; it should just be a recommendation of SRFI 2xx.  The matter was considered in WG1 but rejected, I think; there was definitely a Chibi ticket that Alex turned down.
(6) In error situations where the error is easily detectable,
implementations should guard against the error with "assume".


John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
If I read "upcoming" in [the newspaper] once more, I will be downcoming
and somebody will be outgoing.