What is the rationale for not including an ImmutableByteArray alongside Int, Long, and Double?
I fully understand not getting full coverage of the primitive types, and each one has to have its own implementation, but byte seems quite valuable to me. I do not know of a solution for an immutable, thread-safe chunk of binary data that would be better than an ImmutableByteArray.
There is obviously a cost for each primitive type array that gets implemented, but bytes seem particularly valuable to me. I think there are strong arguments against other primitive arrays:
- Booleans need implementation decisions (packed bits vs. element per value?) that may prevent a good one-size-fits-all implementation
- Char arrays may as well be strings
- Short and Float arrays carry a questionable value proposition over Int and Double
But, I can't come up with a reason to avoid bytes. Is there a place for immutable byte arrays in 23? Is there another structure I'm not thinking of that covers the immutable binary data use case?