4 ms·
Btw, OCaml also transitioned from read-write Strings to read-only Strings, and Buffer to be that read-write string. It was introduced in 4.02 released September
by _flux 1y ago
Btw, OCaml also transitioned from read-write Strings to read-only Strings, and Buffer to be that read-write string. It was introduced in 4.02 released September 2014.
I recall it was a bit bumpy, but not all that rough in the end. I suppose static type checking helps here to find all the ways how it could be used. There was a switch to allow running old code (to make strings and buffers interchangeable).
- debugnik 1y agoNitpick: `bytes` is the read-write string, `Buffer` is the StringBuilder-like.
- _flux 1y agoOops, that's not a nitpick but a good correction :).
- dragonwriter 1y ago> Btw, OCaml also transitioned from read-write Strings to read-only Strings Ruby is not doing that, it's transitioning from mutable strings that can be frozen with no special treatment of literals (unless you opt-in to literals being frozen on per file basis) to mutable strings with all string literals frozen.