logoalt Hacker News

fragmedeyesterday at 8:09 AM2 repliesview on HN

comparing it with c? thread safety maybe?


Replies

odo1242yesterday at 9:54 PM

The language also does not support goroutines, locks, or channels, except through using the C threading libraries.

(I think the original author meant type safety when they made that statement. Though it still doesn't make all that much sense to me)

DanielHByesterday at 9:22 AM

As far as I understand co-routines help don't really help with memory shared across go-routines. They only help in the fact you need to manage spawning and joining threads, making it easier to do stuff in parallel. But they don't provide thread-safety.

edit: I suppose you don't get segfaults or buffer overflows and the sort in go for accessing memory in a parallel context, you get recoverable panics. But that is still not really thread safety in my opinion, it is memory safety.