Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go's creators said "Don't communicate by sharing memory", but then designed goroutines to do exactly that. It's quite hard to not share memory by accident, actually.

It's not like it's a disaster, but it's certainly inconsistent.





I don't think allowing developers to use their discretion to share state is "certainly inconsistent". Not sure what your threshold is for "quite hard" but it seems pretty low to me.

Goroutines could've lacked shared memory by default, requiring you to explicitly pass in pointers to shared things. That would've significantly encouraged sharing memory by communicating.

The opposite default encourages the opposite behaviour.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: