Re:It’s Not Wrong that “ ”.length == 7
by BeefWellington on Friday June 02, 2023 @08:52AM
(#36164408)
> Why should it not? You’re literally breaking the content.
Strings are just an array of unicode codepoints rather than "characters", so all I'm doing is asking for the first three of those codepoints.
> Though in reality, indexing strings is a broken operation. That you’re using it at all is the core issue.
Substring is a broken operation? What's the justification for that idea?
> Strings are just an array of unicode codepoints rather than "characters", so all I'm doing is asking for the first three of those codepoints.
"Ice trays are just a pile of molecules rather than "cubes", so all I'm doing is separating those molecules", he states as he activates the igniter.
> Substring is a broken operation? What's the justification for that idea?
You take a thing and you mangle beyond recognition without regards for its purpose or meaning. That's like considering the jaws of life a normal part of opening a door to take a piss at work.
Re:It’s Not Wrong that “ ”.length == 7
by MatthewWilkes on Friday June 02, 2023 @10:43AM
(#36165762)
One of the first things the author of the article does is breaks it down into the 5 code points and explains their individual meanings.
Why should it not? You’re literally breaking the content.
Though in reality, indexing strings is a broken operation. That you’re using it at all is the core issue.
> Modern strings are complex objects that have evolved a bit past char[] or byte[].
And yet that’s exactly what you’re advocating, just with 21 bit chars.