loading...

re: Sorting in Go – Don’t Reinvent This Wheel VIEW POST

FULL DISCUSSION
 

Thanks for the clear explanations!

One question unrelated to sorting regarding your Swap function, why don't you swap them using tuple assignments:

item[i], item[j] = item[j], item[i]

Was it just to be more expressive in the demonstration?

 
Code of Conduct Report abuse