3 ms·
.. one of the safe languages like.. Go.. o_O
by a_random_user 9mo ago
.. one of the safe languages like.. Go.. o_O
- guywithahat 9mo agoGo is a safe language? It has garbage collection and performs checks for things like buffer overflows and use-after-free
- tialaramex 9mo agoYou can have data races in "safe" Go. If you race a trivial object [such as an integer] it's just radioactive and so long as you didn't need it to have any particular value (e.g. you were just going to write it to a log anyway, or you just discard it) you're fine. However if you race a non-trivial object then that's immediately Undefined Behaviour. Of course Go programmers will say "Just don't do that" but that's exactly what C programmers told us about bounds misses, use after free and so on...
- goku12 9mo ago(Memory) safe languages are allowed to guarantee memory safety at any stage, including at runtime using GC and bound checks. That makes every GC language memory safe to a reasonable extend. The novelty in Rust is that it does the same at compile time, mostly automatically.