News for hackers. Stuff that matters.
Re:It's React, but in Python by lelanthran on Wednesday June 07, 2023 @02:41AM (#36223628)
You cannot really compare Rust and Go.

Rust is for when you really need to perform manual memory management. If you don't need that, then a GC language is better.

If you're choosing manual memory management over GC, you better have a really good reason to do so or a really small application that you're writing.

Re:It's React, but in Python by remkop22 on Wednesday June 07, 2023 @02:51AM (#36223698)
Literally the whole point of rust is to not do manual memory management and let a compiler handle that for you.
Re:It's React, but in Python by lelanthran on Wednesday June 07, 2023 @03:18AM (#36223866)
> 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.

Re:It's React, but in Python by remkop22 on Wednesday June 07, 2023 @03:29AM (#36223944)
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.