Go is a great language — probably one of the best — but it is not without its warts. Let me illustrate one aspect of Go that is really useful, but also one of the issues that using that feature causes (aka an experience report.) Pro One of the many great features in Go is …
On Typing Strings in Go
One of the niftier aspects of programming in Go is you can create named types derived out of existing types. For example, let’s consider storing and passing a URL. Depending on their needs programmers get to choose either a string or a class to represent URLs in many others languages. Often times programmers will choose …
Proposal: Contracts in Go (Not Generics)
Photo by Cytonn Photography on Unsplash #Update When I wrote this I did not remember that the draft design for Go2 generics chose to use the name “Contracts” for a new language feature to provide a Go-idiomatic response to generics. Still, I stand by my use of the name contracts for this proposal as I …
GoLang Strict Typing and Interface Slices
Photo by Louise Lyshøj on Unsplash This is a GoLang Experience Report. …but you cannot define the rows parameter as type []RowInserter because []interface{} won’t match it, even though RowInserter is itself an interface. Background I am relatively new to programming Go, but I have been developing software professionally in a variety of programming languages …
Continue reading “GoLang Strict Typing and Interface Slices”