logoalt Hacker News

baokaolatoday at 12:30 PM3 repliesview on HN

There's only one language that's more dangerous than C and that is unsafe Rust. I say that only half-jokingly.


Replies

selfmodruntimetoday at 2:02 PM

It's true and I write Rust and love it dearly. There is an entire book about working with the unsafe keyword and its aliasing rules: https://doc.rust-lang.org/nomicon/working-with-unsafe.html

hota_mazitoday at 4:11 PM

What do you mean?

C is unsafe 100% of the time. Rust is only unsafe in unsafe{} blocks.

show 1 reply
Ygg2today at 12:38 PM

Good job falling for the Zig propaganda. I say that half-jokingly.

EDIT: You can't be serious people. Rust unsafe is safer than C, if for nothing else, for knowing which pointers are aliasable.

show 1 reply