Hello, I have found that I have a tendency to try to code non-method funcs in a pure way (functionally speaking - so that the caller will not modify any of its params). I know it is possible to pass a pointer (or slice or map - is that all of them?) as a function param and then modify it in the called func like is done in https://gobyexample.com/pointers in the zeroptr func, but I have a strong preference to try to do this as rarely as possible and to never modify func params if I can get away with it. However I see some Go code written by others that defintely doesn't agree with this idea and I wonder if perhaps I am misguided. Perhaps it would make sense in another language but doesn't have a place in Go. I am not really sure.
I just wanted to know if anybody had any well-formed opinions on this based on tested experience with Go. Thanks for your help. - nc -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0717df05-5f91-4bfd-9a67-2301b47596c2n%40googlegroups.com.