Hacker News new | ask | show | jobs
by remkop22 1109 days ago
Literally the whole point of rust is to not do manual memory management and let a compiler handle that for you.
1 comments

> Literally the whole point of rust is to not do manual memory management and let a compiler handle that for you.

Incorrect. The compiler forces you to handle memory properly. It doesn't, as far as I know, manage it for you.

The burden is on the programmer to do it correctly. The compiler stops the programmer from doing it incorrectly.

Compare with GC, where the programmer is freed from the burden of worrying about memory altogether.

I would make a distinction between managing memory (malloc, free) and then subsequently handling said memory in a safe manner.

The first part Rust does for you.

The second part you'll indeed have to do yourself and the compiler will force you to do it safely.