News for hackers. Stuff that matters.
Re:Go 1.21 by binwiederhier on Thursday June 22, 2023 @09:21AM (#36431751)
That's actually a great explanation of why it's not easy to implement the clear function the way it makes sense for slices. However, this is a built-in, not a normal function, so they could make it do whatever they like, including doing the intuitive and desired thing, no? It seems to me that they've just created another "loop variable gotcha" type situation...

There are no comments on this comment yet.