Argument order of bytevector-*-set! Shiro Kawai (15 Sep 2026 10:22 UTC)
Re: Argument order of bytevector-*-set! Shiro Kawai (15 Sep 2026 10:46 UTC)

Argument order of bytevector-*-set! Shiro Kawai 15 Sep 2026 10:22 UTC

Except single-octet and native endianness ones, the setters take the
argument in this order: bytevector, index, value-to-set, endianness,
and size (if necessary).
If they take the value-to-set as the last argument, we can just use
them as a setter procedure corresponding to the getter, e.g.

(getter-with-setter bytevector-uint-ref bytevector-uint-set!)

Is there a reason for the current argument order?