Re: Functional random data streams Marc Nieper-Wißkirchen 05 May 2020 09:35 UTC

Am Di., 5. Mai 2020 um 11:25 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@nieper-wisskirchen.de>:

[...]

> P.S.: While I cannot say much about the particular efficiency in the
> Guile implementation, I agree with Mark Weaver's comment from
> https://lists.gnu.org/archive/html/guile-devel/2019-07/msg00000.html
> that we should promote functional constructs when there aren't reasons
> that stand against it (like efficiency reasons). In this sense, we
> should take care that the final collection of stream procedures won't
> be smaller than the final collection of generator procedures in
> R7RS-large.

This is even more important in a language like Scheme (as opposed to
Standard ML) because it has CALL/CC. As soon as you have higher-order
procedures, it is hard to make them CALL/CC-aware when you use
imperative constructs. Generators seem to be particularly problematic
because they cannot be rewound in a DYNAMIC-WIND.