3 ms·
A pointer is neither safe nor unsafe and in my view people should be expected to know what they are doing when passing pointers across concurrent threads of exe
by mytailorisrich 7y ago
A pointer is neither safe nor unsafe and in my view people should be expected to know what they are doing when passing pointers across concurrent threads of execution.
It's not rocket science.
Goroutines are supposed to be lightweight so it makes sense to allow lightweight communication.
- qtplatypus 7y agoOn the other hand how often have you read in documentation “Do not mutate this buffer” or the equivalent? It is very possible to create traps for people who pick up your code later on. Having the compiler detect those problems rather then it causing a runtime error is something highly desirable.