News for hackers. Stuff that matters.
Re:Go is not an easy language by cube2222 on Monday February 22, 2021 @02:26AM (#26221760)
Go actually does contain a sort package in the stdlib: https://golang.org/pkg/sort/ with the most ergonomic function being sort.Slice

As for a complicated for loop instead of the functional equivalent: I too am a fan of functional patterns in this case, but the for loop equivalent in my opinion is just as readable in 99% of cases. A little more verbose, that's all. Matter of taste.

There are no comments on this comment yet.