Photo by Mike Szczepanski on Unsplash

Support for channels in Go gives us the opportunity to compose code using pure functions — functions that take state and return state without side effects.

From experience 3 signatures for these pure functions emerge:

Simple Functions

These functions don’t use channels as parameters, rather take and return standard data structures (structs, slices, maps etc.) and optionally an error, blocking until results are available.

The problem of course is that this will…

Photo by Nick Fewings on Unsplash

Being a relatively new industry software engineering terminologies and analogies have come predominantly from civil engineering and manufacturing. Terms such as architecture, foundation, build, production, cycle time, lean… dominate.

This strategy serves the purpose when talking to someone outside the profession by helping them relate; and stops us software engineers from sounding even more nerdy than we already do.

However, it does introduce a problem when we use this language with junior software engineers entering the profession and even in general day to day professional conversation. …

Photo by Maria Ionova on Unsplash

Go has native concurrency constructs which free the developer from dealing with OS threads and instead allows them to think in higher level abstractions. And it is elegant and refreshingly simple to use.

After safety and correctness, the main challenge with writing concurrent code, in general, is readability. Even with the constructs available in Go, it is quite easy to end up with code that requires the reader to jump around various sections of a function or file to make sense of the control flow.

Additionally with Go’s design of goroutines as entities without explicit cancellation and cooperative scheduling, it’s…

Arun Barua

Passionate about Software Engineering. Go evangelist.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store