News for hackers. Stuff that matters.
Re:Smart pointers for the kernel by gary_0 on Friday October 18, 2024 @12:27AM (#41876335)
Also Rust is far from the only language that gives you escape-hatches out of the safety sandbox where you can make a mess if you're reckless. Java, Python, Go, C#... (heck, C# also has an `unsafe` keyword) but hardly anyone would argue those languages have the same safety issues that C has.
Re:Smart pointers for the kernel by Y_Y on Friday October 18, 2024 @04:43AM (#41877474)
In C unsafe code is typically marked by surrounding it with {braces}.
Re:Smart pointers for the kernel by m4rtink on Friday October 18, 2024 @07:17AM (#41878316)
Good one! ;-)
Re:Smart pointers for the kernel by vacuity on Saturday October 19, 2024 @10:55PM (#41892539)
Unlike the other slew of "memory safe languages", Rust aims for a middle ground of sorts where "unsafe" is more visible and acknowledged but also guarded against. It's a rather third way of treating the inevitable escape hatches. It's more about how it's taught and treated socially that makes Rust's unsafe a different experience from, say, how C or alternatively Java approaches "unsafe".