News for hackers. Stuff that matters.
Re:Smart pointers for the kernel by lostdog on Friday October 18, 2024 @03:31PM (#41882679)
The most common bug in that type of code is mixing up x and y, or width and height somewhere in your loops, or maybe handling partial blocks. It's not really what Rust aims to protect against, though bounds checking is intended to be helpful here.

I don't get the argumentshere. In practice, Rust lowers the risk of most of your codebase. Yeah, it doesn't handle every logic bug, but mostly you can code with confidence, and only pay extra attention when you're coding something intricate.

A language which catches even these bugs would be incredible, and I would definitely try it out. Rust ain't that language, but it still does give you more robust programs.

Re:Smart pointers for the kernel by uecker on Saturday October 19, 2024 @01:09AM (#41885772)
The issue is a memory safety issue, which Rust aims to protect against.

But I am not saying Rust is bad. My issue is the complete unreasonable exaggeration in propaganda from "C is completely dangerous and Rust is perfectly safe". And then you discuss and end up with "Rust does not protect against everything, but it still better", which could be the start of a reasonable discussion of how much better it actually is.

Re:Smart pointers for the kernel by biorach on Saturday October 19, 2024 @07:12AM (#41887156)
> C is completely dangerous and Rust is perfectly safe"

Nobody in this conversation said that.

If you're actually continuing an argument from somewhere else you should save everyone a lot of time and say so up front, not 10 comments in.

Re:Smart pointers for the kernel by uecker on Saturday October 19, 2024 @12:10PM (#41888635)
The start of the thread was "The difference is every line of C can do something wrong while very few lines of Rust can." but this is an exaggeration of this kind.
Re:Smart pointers for the kernel by biorach on Saturday October 19, 2024 @01:19PM (#41889092)
yeah well quote that line then