News for hackers. Stuff that matters.
Re:Go is still not good by matt_kantor on Saturday August 23, 2025 @06:50AM (#44994989)
> except things that do require you to assume it's valid UTF-8

That's the point.

Re:Go is still not good by maxdamantus on Saturday August 23, 2025 @11:02AM (#44996493)
But no one has demonstrated an actual operation that requires valid UTF-8. The reasoning is always circular: "I require valid UTF-8 because someone else requires valid UTF-8".

Eventually there should be an underlying operation which can only work on valid UTF-8, but that doesn't exist. UTF-8 was designed such that invalid data can be detected and handled, without affecting the meaning of valid subsequences in the same string.

Re:Go is still not good by amluto on Monday September 01, 2025 @05:06PM (#45096606)
> UTF-8 was designed such that invalid data can be detected and handled, without affecting the meaning of valid subsequences in the same string.

But there is not a canonical response to invalid data. So literally every operation that might need to make a choice of what to do when presented what invalid data should either (a) accept a parameter asking what to do on error and potentially fail or (b) take a parameter type that forces errors to be handled in advance.