logoalt Hacker News

throw848tjfjtoday at 3:38 PM3 repliesview on HN

Rust is not really memory safe if you combine it with external libraries. Too many "unsafe" keywords, and lack of tooling for code analysis and verification.

Edit: With c, you can do memory safety analysis on all system libraries and entire Linux kernel. Some OS kernels, libs and languages do not have dynamic memory allocation at all!

Some languages are memory safe! Learn more about embedded programming!


Replies

MarsIronPItoday at 4:42 PM

To me Rust is just a nicer language than C. I don't care too much about how easy the language makes memory safety, provided it doesn't make it difficult. But Rust's type system, higher-order functions, polymorphism, macros, etc. make it more pleasant to write than C for complicated programs.

estebanktoday at 3:56 PM

Under that rubric, no language is memory safe.

tormehtoday at 3:52 PM

This is correct. Some widespread libraries leak memory, for example. I love Rust, but I don't think this happens much in Java land.

show 1 reply