Go Programming Language

Ok, so I’m a little late on the bandwagon.

I’ve just recently started learning Go, and let me tell you – it has been an enjoyable experience. If you’re curious about Go (Go-curious?), then this post is for you.

Go is a general purpose programming language. I’ll defer a more concise description of the language to the website for Go:

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

I don’t think I could have said it better myself. The language has a wonderful set of tools such as the “go get” command, which retrieves dependencies for you and installs them locally such that they are in your Go development path. There is also the “gofmt” tool, which automatically formats your code, removing an all-too-often point of contention between developers – code style.

Go also features pointers so that you can pass arguments to a function or method by value or by reference. However, there is not currently any support for pointer arithmetic.

There are also slices, which are a data type that represents a subsection of an array – slices make it very easy and convenient to work with arrays. Under the hood, slices are essentially structures (a ‘struct’, for those readers familiar with C) which contain a reference to the first element of the slice (array subsection) and a length property. If you’re familiar with Python, a Go slice, at least on a functional level, is practically identical to a Python slice.

Go also has a very rich regular expression package. Not only does it have a large collection of methods to choose from, but the regular expression implementation provided in the standard library is guaranteed to run in linear time in relation to the size of the input.

In terms of reserved words/keywords of the language itself, you could likely learn them all in a weekend. It is a fairly compact core language with a very extensive standard library. Overall, I’m quite impressed with the language. It is feasible to learn the language (although mastery is a different issue) over the span of a weekend if you have enough free time.

If you’d like to read more, check out the links below.


Further Reading: