3 ms·
Seems like an obvious root cause for these sorts of things are languages (and developers) who can't or won't differentiate between "byte length" and "string len
by ryandrake 4y ago
Seems like an obvious root cause for these sorts of things are languages (and developers) who can't or won't differentiate between "byte length" and "string length". Joel warned us all about this 20 years (!!) ago[1], and we're still struggling with it.
1: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ https://www.joelonsoftware.com/2003/10/08/the-absolute-minim...
- rockwotj 4y agoString length isn't even a well defined term. Do you mean codepoint length? Or the number of graphemes?
- ryandrake 4y agoGood point. When it comes to text there are a lot of "lengths". Languages should differentiate between each of those lengths, and programmers should pay attention to the difference and actually use the right one for the whatever situation they're programming.