3 ms·
Literally the whole point of rust is to not do manual memory management and let a compiler handle that for you.
by remkop22 3y ago
Literally the whole point of rust is to not do manual memory management and let a compiler handle that for you.
- lelanthran 3y ago> 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.
- remkop22 3y agoI 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.