SRFI 235 review Wolfgang Corcoran-Mathe (03 Sep 2022 13:51 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (03 Sep 2022 16:45 UTC)
Re: SRFI 235 review John Cowan (03 Sep 2022 17:21 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (03 Sep 2022 18:18 UTC)
Re: SRFI 235 review Wolfgang Corcoran-Mathe (04 Sep 2022 20:06 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (05 Sep 2022 06:31 UTC)
Re: SRFI 235 review John Cowan (05 Sep 2022 16:44 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (05 Sep 2022 17:58 UTC)
Re: SRFI 235 review John Cowan (05 Sep 2022 23:45 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (06 Sep 2022 06:27 UTC)
Re: SRFI 235 review Wolfgang Corcoran-Mathe (06 Sep 2022 19:46 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (06 Sep 2022 21:39 UTC)
Re: SRFI 235 review John Cowan (07 Sep 2022 01:46 UTC)
Re: SRFI 235 review Per Bothner (07 Sep 2022 05:04 UTC)
Re: SRFI 235 review John Cowan (07 Sep 2022 18:37 UTC)
Re: SRFI 235 review Per Bothner (07 Sep 2022 22:23 UTC)
Re: SRFI 235 review John Cowan (07 Sep 2022 23:29 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (09 Sep 2022 09:25 UTC)
Re: SRFI 235 review John Cowan (09 Sep 2022 19:54 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (09 Sep 2022 20:11 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (07 Sep 2022 06:29 UTC)
Re: SRFI 235 review Wolfgang Corcoran-Mathe (07 Sep 2022 18:02 UTC)
Re: SRFI 235 review Marc Nieper-Wißkirchen (07 Sep 2022 20:10 UTC)
Re: SRFI 235 review Lassi Kortela (07 Sep 2022 18:41 UTC)
Re: SRFI 235 review John Cowan (03 Sep 2022 17:17 UTC)
Re: SRFI 235 review Arvydas Silanskas (04 Sep 2022 08:35 UTC)

Re: SRFI 235 review Marc Nieper-Wißkirchen 07 Sep 2022 06:28 UTC

Am Mi., 7. Sept. 2022 um 03:46 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
>
>
> On Tue, Sep 6, 2022 at 5:39 PM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
>
>> there cannot be an
>> implementation, portable or not, on every Scheme implementation that
>> is allowed by R7RS. (As I tried to explain earlier, even access to
>> something like "%true-promise" would not help.)
>
>
> I continue to find your explanation incomprehensible, but I'll add a warning saying that on an unusual implementation of Scheme promises, it is not possible to treat promises as thunks; however, no such implementations are known.

Wolfgang, have you understood my point? Maybe you can explain it
differently and better.

It should be more than a warning.  It should say that it only works
with an extended version of the R7RS semantics. With R7RS (small)
semantics alone, it does not make sense to specify a procedure that is
polymorphic in promises and non-promises because every value can be a
promise.

In any case, I strongly suggest writing a SRFI dealing exclusively
with lazy evaluation and combinators for promises instead of making
SRFI 235 polymorphic.

I imagine that Wolfgang could be in the mood to write such a SRFI.

>>  I would
>> suggest either making promises a disjoint type or making them
>> indistinguishable from ordinary values, which would mean implicit
>> forcing and probably a Haskell-like kernel for Scheme.
>
>
> IMO the second option would be extremely destructive to the Scheme effort: all existing Schemes would have to be not just modified but discarded.  The first option is feasible and indeed desirable.  At the same time, we should close off the "promise = result" and "promises are implicitly forced in certain cases" options.

I agree with you about all these points; it's far easier to implement
this for Schemes that would natively do implicit forcing, than the
other way round.

For SRFI 226, I can make all this mandatory.

> I don't feel very strongly about "polymorphic `force`" as long as the other cases are suppressed.

I would remove it for two reasons: It's again some kind of ad-hoc
polymorphism that is not really needed and, secondly, there would be
no consistent logic:

A promise is a Scheme value like any other, so if force were
polymorphic, `(force (make-promise 'foo))` would be justified to
return `foo` as much as a promise promising `foo`.

Without polymorphism, `force` would be forced :) to return `foo`.