logoalt Hacker News

beltsazar • yesterday at 4:20 PM • 1 reply • view on HN

> That does not make sense to me.

You said that because you assumed Go is memory-safe in all conditions.

> Go is memory-safe

Yes, but only if there's no data race.

Go is not like Java. Java doesn't guarantee no data race, but when it happens, it's still memory-safe.


Replies

shikck200 • yesterday at 4:36 PM

Neither Java or Go guarantees data-race freedom. A data race does not by itself make ordinary Java or Go code memory-unsafe in the C/C++ sense.

I fail to see how a racy Java program is more memory safe than a racy Go program?

➕ show 3 replies