O'Reilly logo
  • Scott Kidder thinks this is interesting:

you have to be very careful when using shared memory from two goroutines: if either variable in this example is shared then this kind of optimization would have confusing consequences. In general, it’s a good idea to only share read-only strutures.


Cover of The Go Programming Language Phrasebook


Analogous to specifying all function arguments as final, not modified.