On Sun, Aug 17, 2025 at 10:39 PM Mikk Margus <mikk.mar...@gmail.com> wrote:
> It's a bit more than an implementation detail, considering this somewhat > obscure and surprising behaviour. > https://go.dev/play/p/xnGqtYansHY Let me please disagree on the "obscure" and "surprising behavior" points. Slice is a window into an array. Mutating an array element (of the slice's backing array) mutates an array element - as the linked program demonstrates. It's all in the spec. What is surprising [to me] is that it seems many people probably do not read the specs. (I'm no better. I have never read my 400 pages, half kilogram, printed on dead trees car manual.) -- 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 visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-Wwmow_9dg8SaL-mi4Hh3hq_Dw-1FOp-D3DA1WF8EXS%2BA%40mail.gmail.com.