Could we move string and bytes to sliced types?

I’m not sure I entirely got your comment, but perhaps the point here is the notion of slice validity which, while applicable in other contexts, mostly make sense in the context of byte streams (and perhaps one day could be enforced via things like modes)

Since these slices bound their life-span in a way or another you don’t get into the problems @chshersh mentioned.

In the context of byte streams, yes. See the second part of this comment.

1 Like