News for hackers. Stuff that matters.
Re:Eliminating Memory Safety Vulnerabilities at the Source by nightpool on Wednesday September 25, 2024 @06:37PM (#41652607)
It's not just Rust—rewriting a C network service into Java or Python or Go is also an example of transitioning to memory safe languages. The point is that you're not exposed to memory safety bugs in your own code. Arguably it's much better to choose a language without Rust-like manual memory management when you don't absolutely need it.
Re:Eliminating Memory Safety Vulnerabilities at the Source by pdimitar on Thursday September 26, 2024 @05:56AM (#41656477)
I have chosen Rust over Golang on a number of occasions for a much more boring reason: Golang lacks enums / tagged unions / sum types. When you have to manually eyeball your code to ensure exhaustiveness, it gets old and tiring really fast.

For that reason I'd use OCaml as well even though it has GC, because it has sum types. That is, if I ever learn OCaml properly.

Re:Eliminating Memory Safety Vulnerabilities at the Source by tialaramex on Thursday September 26, 2024 @02:15PM (#41661446)
If you need concurrency then depending on exactly what you're doing with it Rust still looks like the right choice. If you can just have it magically work no worries, but the moment you need synchronization primitives or phrases like "thread safe" come into the conversation you're much more likely to get it wrong in the other languages.