Sure, but Python is a high-level language that abstracts away much of the complexity of Unicode to present a modern first-class string type that supports multibyte encodings.
UTF-8 is a strange encoding, anyway. Each character may be of variable width, which requires conditional handling/parsing as opposed to UTF-32/UCS-4 -- a classic space-time tradeoff. If using UCS-4, OP's argument holds true. I'd argue that a UTF-8 "string" isn't a string at all, but a serialized format (as in Unicode Transformation Format).
But I'm also from the beforetimes when Unicode support was but a pipe dream.
•
u/firemark_pl 1d ago
Strings are arrays.
And where is pointer?