News for hackers. Stuff that matters.
Re:Apt Rust requirement raises questions by dboon on Tuesday November 25, 2025 @10:41AM (#46046839)
It’s very easy to write a string library in C which makes string operations high level (both in API and memory management). Sure, you shouldn’t HAVE to do this. I get it. But anyone writing a parser is definitely skilled enough to maintain a couple hundred lines of code for a linear allocator and a pointer plus length string. And to be frank, doing things like “string operations but cheaply allocated” is something you have to do ANYWAY if you’re writing e.g. a parser.

This holds for many things in C

Re:Apt Rust requirement raises questions by steveklabnik on Tuesday November 25, 2025 @11:20AM (#46047339)
This is just a variation of the "skill issue" argument.

If it were correct, we wouldn't see these issues continue to pop up. But we do.

Re:Apt Rust requirement raises questions by josefx on Tuesday November 25, 2025 @01:34PM (#46049049)
I think it is more a matter of convenience. There are countless string implementations for C, some tiny projects, others part of larger frameworks like Glib. At the end of the day a C developer has to decide if they are going to pull in half of gnome to handle a few lines of IO or if they are just going to use the functions the C standard conveniently ships with. Most people are going to do the later.
Re:Apt Rust requirement raises questions by criddell on Tuesday November 25, 2025 @11:18AM (#46047307)
> a pointer plus length

What would length represent? Bytes? Code points?

Anyway, I think what you are asking for already exists in the excellent ICU library.

And it's not a very easy thing to maintain. Unicode stuff changes more often than you might think and it can be political.