Having a static type system is orthogonal to banning mutation, isn't it?

It is, but effect types let you have mutation with some guarantees that the mutations don't step on each other's toes.

If you don't see it that drastic, feel free to suggest different names
that you think would better carry the meaning of the "perform" form. I
just defy calling the form "unsafe". There's nothing unsafe about it
in the usual sense of unsafety. (For, otherwise, every procedure
evaluation and every "let" form would be unsafe, as well as would be
"map", etc.) The name should not be too complicated because people
should be encouraged to use the form whenever it carries the semantic
content better than "begin".

Since those basic features can be out-of-order in Scheme you have a point. It's too late to change the fundamentals in RnRS.

How about the name "independently"? That describes what it does while not being too short or too long.

(define (set-car+cdr! p x y)
  (assert (pair? p))
  (independently
    (set-car! p x)
    (set-cdr! p y)))

(let ((bv (make-bytevector 36)))
  (independently
    (bytevector-u32-native-set! bv 32 offset)
    (bytevector-u32-native-set! bv 28 (xid-id shmseg))
    (bytevector-u8-set! bv 27 0)
    (bytevector-u8-set! bv 26 (if send-event 1 0))
    (bytevector-u8-set! bv 25 format)
    (bytevector-u8-set! bv 24 depth)
    (bytevector-s16-native-set! bv 22 dst-y)
    (bytevector-s16-native-set! bv 20 dst-x)
    (bytevector-u16-native-set! bv 18 src-height)
    (bytevector-u16-native-set! bv 16 src-width)
    (bytevector-u16-native-set! bv 14 src-y)
    (bytevector-u16-native-set! bv 12 src-x)
    (bytevector-u16-native-set! bv 10 total-height)
    (bytevector-u16-native-set! bv 8 total-width)
    (bytevector-u32-native-set! bv 4 (xid-id gc))
    (bytevector-u32-native-set! bv 0 (xid-id drawable)))
  bv)

Reply via email to