News for hackers. Stuff that matters.
Re:Three Months of Go from a Haskeller’s perspective (2016) by bankisan on Wednesday November 04, 2020 @10:29AM (#24989854)
Right, but they mentioned sending immutable structs which is why I gave the struct example. But you're right that every declared map is a just a pointer.

With respect to your second point, I see what you mean but I still don't think that's a negative of Go. You can pass in copied values without having to have a deep_copy() primitive (loop map values and copy to new map, dereferencing a pointer, etc.). Like other parts of Go, if you want to make your data immutable there is no syntactic sugar. You have to explicitly write it out.

Re:Three Months of Go from a Haskeller’s perspective (2016) by simiones on Monday November 09, 2020 @08:56AM (#25034824)
> With respect to your second point, I see what you mean but I still don't think that's a negative of Go.

It is a negative of Go, because Go pushes you into the pit of failure by its design: it is much, much harder to do the right thing (send deep copies of objects over channels) than it is to do the wrong things (send pointers or shallow copies over channels).

Re:Three Months of Go from a Haskeller’s perspective (2016) by eru on Thursday November 05, 2020 @03:11AM (#24996488)
You'd have to roll your own deep_copy by hand (or code generation) for every single data type.