Re: New draft (#4) of SRFI 207: String-notated bytevectors Wolfgang Corcoran-Mathe 07 Oct 2020 16:22 UTC

On 2020-10-07 18:06 +0200, Marc Nieper-Wißkirchen wrote:
> Speaking of this procedure: Isn't a similar procedure that returns a
> generator (instead of directly writing the bytes to a port) more
> general and useful?

e.g. make-bytestring-generator?  So that the following are
operationally equivalent:

    (generator-for-each (lambda (b) (write-u8 b out))
                        (make-bytestring-generator arg ...))

    (write-binary-bytestring out arg ...)

If this is correct, the verbosity of the first version is leading me
to believe that write-binary-bytestring should stay.  But yes, a
bytestring generator would be a useful thing to have in general.

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"Some folks think Postmodernism means little more than the Empowerment
of the Vulgar.  Some folks think the same about Perl." --Larry Wall