Book Reviews —9 min read
Book Review: Go Fundamentals

Very thorough, perhaps to a fault, this book is probably a great second read for most Go newcomers.

Go Language Spec —2 min read

Last week Go 1.20 was released! It did include a few changes to the Go spec, but none of them affect the portions we’ve covered so far in this series, so we’ll just continue on our merry way… Variables A variable is a storage location for holding a value. The set of permissible values is determined by the variable’s type. A variable declaration or, for function parameters and results, the signature of a function declaration or function literal reserves storage for a named variable.

Book Reviews —5 min read
Bonus Book Review: Learn Go with Pocket-Sized Projects

A bonus review of this early-access book, which I'm quite excited about.

Go Language Spec —3 min read
Constants, typed vs untyped

Constants … Constants may be typed or untyped. Now that’s interesting. And powerful. This is one of the features of Go I featured in my recent video 10 Reasons I Like Go. This feature really helps bridge the gap between the convenience of dynamically typed languages, and the safety of statically typed languages. Let’s look at the details… Literal constants, true, false, iota, and certain constant expressions containing only untyped constant operands are untyped.

Book Reviews —7 min read
Book Review: Go For Beginners

This well-written, quick intro to Go for professional developers has some really strong points, but some important down sides, too.

Go Language Spec —3 min read
Constants don't overflow

Constants … Numeric constants represent exact values of arbitrary precision and do not overflow. Consequently, there are no constants denoting the IEEE-754 negative zero, infinity, and not-a-number values. Now this is a very interesting thing about constants in Go, and it’s something that confuses a lot of people. So let’s play around with this one a bit. If you’re experienced with compiled languages, you’re probably already familiar with numeric overflows.

Book Reviews —7 min read
Book Review: Learning GO Programming

Very well organized, reasonable content, but the rampant grammatical errors are terribly distracting.

Go Language Spec —1 min read
Constants at compile time

Yesterday I made a passing comment in the last code example: Although x is not a constant, the result of len(x) is, because it is known at compile time. I want to dive into this aspect of constants in Go today. In Go (or at least most, if not all implementations of Go) a constant is logically replaced during compilation. This can be a useful mental shortcut when trying to determine whether a given expression can be a constant or not.

Book Reviews —8 min read
Book Review: Beginning Go Programming

Full of factual errors, poorly edited, poorly organized. All around a bad book.

Go Language Spec —2 min read

Constants There are boolean constants, rune constants, integer constants, floating-point constants, complex constants, and string constants. Rune, integer, floating-point, and complex constants are collectively called numeric constants. So there we have it. A comprehensive list of the available constant types in Go. And all but boolean and string constants are numeric. Notice that none of the composite types can be constants in Go. You can’t have a constant array, slice, struct, or interface.

Book Reviews —5 min read
Book Review: Learning Go

"The focus for Learning Go isn't just how to write programs in Go; it's how to write Go idiomatically."