Go: Range is by Value

TL;DR: The value for each item in a range loop is not by reference. Instead, use the index index := range foos.Bars and index to the item &foos.Bars[index]. I learned a practical lesson today about how the range keyword works in Go. Here's the scenario. I…

Whimsy

As it turns out, I'm really bad at following through with plans. I recently intended to dig through algorithms in Go, but here I find myself doing whimsical things with my time instead. A couple of years ago I had a dubious amount of fun with a tiny bit of…

Go Algorithms: Sorts

I started with Go's sort package for some inspiration on how to build the API for my implementations. It is nice to be able to look at other approaches, especially when I'm more accusotmed to doing things in Node.js or C#. The Interface Sorting algorithms generally only need to…

Algorithms in Go

Lately I have been learning a lot about Go. I decided a great independent study subject would be to review Algorithms, Fourth Edition in the context of Go. However, this presents a few obsticles that ups the degree of difficulty. Most notably, the Go language does not support generics. While…