Hi, Jean Abou Samra <j...@abou-samra.fr> skribis:
> What do you think about making it more similar to substrings? > There the 'substring' procedure makes a copy-on-write substring, > and you have substring/shared if you really want shared mutation. > Would something like this be meaningful / feasible / useful > for bytevectors? I’m not convinced there’s a need for copy-on-write bytevectors, and it would be hard to implement, and to implement efficiently—bytevector-mutating instructions would have to check whether they’re accessing a CoW bytevector and DTRT. What could be convenient though is ‘bytevector-copy’ (no bang), which would combine ‘make-bytevector’ + ‘bytevector-copy!’. Ludo’.