The case for atomic types in programming languages
Introduction In episode 2, Miki examined the impact interfaces have on the performance of a Go program. To perform this experiment, Miki invoked a type’s method in two ways: with the concrete type and as an interface function to measure the difference in execution time. The con...
Introduction In episode 1, Miki had two functions that performed the similar operation, but returned different types. To refactor this, Miki rewrote both functions as a generic function that allowed him to specify the type to be returned during invocation. In some cases, the comp...
Go has a great standard library. What if we think about our work not merely as building one-off programs, but instead contributing packages to the universal Go library?
The magic of using small samples to learn about large data sets.
Go 1.20 was released on February 1, 2023. That means it’s time for the final part of this three part look at What’s New in Go 1.20. In this part, we’ll look at some of the relatively minor changes to the standard library. Before we begin, here are two changes I won&...
This tutorial is written for anyone who is new to Go. In it we'll explain what packages, import statements and modules are in Go, how they work and relate to each other and — hopefully — clear up any questions that you have. We'll start at a high level, then work dow...
If you're working with applications that require translations, you may be using gettext's .po format to store your translations. One issue I've found with this is that sometimes it can be hard to quickly audit whether there are any missing translations, especially in larger appli...
Introduction Go interfaces are beneficial to Go developers because they: Allow interfaces to separate mechanism from behavior. Increase flexibility of function parameters. Enable mocking of function parameters. With the addition of generics in Go 1.18, interfaces can be used to...