Vectors, boxes and places

Dear Racketeers,

Is there something I have misunderstood about vectors, boxes and places which might explain why immutable boxes are not place-message-allowed, but immutable vectors are?

> (place-message-allowed? (box-immutable #f))
> #f
> (place-message-allowed? (vector-immutable #f))
> #t

c.f.

4.14 Boxes

A box is like a single-element vector, normally used as minimal mutable storage.

Best,

Tim

2 Likes

I don't think there's a deep reason here — probably just that boxes didn't seem useful in a context that disallows mutation, so they were left out. Adding support for boxes would make sense.

2 Likes