|
|
|
|
|
by dminuoso
1668 days ago
|
|
The primary problem is language/library designers/users believing there must be one true canonical meaning of the word „length“ like you just did, and that „length“ would be the best name for the given interface. In database or more subtly various filesystems code the notion of bytes or codepoints might be more relevant. By the way, what about ASCII control characters? Does carriage return have some intrinsic or clearly well defined notion of „length“ to you? What about digraphs like ij in Dutch? Are they a singular grapheme cluster? Is this locale dependent? Do you have all scripts and cultures in mind? |
|