Go Faster - Chapter 9 completed
Hello again. January’s dragging on a bit isn’t it?!
Just a quick update on my progress writing Go Faster! I’m now at 173 pages, over 38,000 words and 124 code examples, all of which are on Github.
I estimate it’s about 85% complete, with chapters on Concurrency and Quality Assurance still to finish.
Writing is more work than I had thought it would be, especially for topics where I don’t have any previous training notes or blog posts, prepared.
A good example is Generics, which completes Chapter 9. Generics are a relatively new addition to the Go language and not an area I’ve had much exposure to myself.
It has been a learning process for me too, but I believe I’ve done it justice, and develop the subject logically.
I’m particularly proud of this excerpt.
One way a generic function differs from a normal function is that we can pass additional type parameters with constraints. Think of these as placeholders for type. The concrete type will be assigned by the compiler when the function is called. The constraint provides some hints to the compiler about what that type is allowed to be. This means some checks are possible during compilation, and we’ll see this in action shortly.
If your experience with Go generics is lacking, like mine was at the beginning of this week, you could do a lot worse than purchasing Go Faster!
Thanks for reading, and please tell your friends and colleagues.