Neil's News

Polyglot 14: Go

12 March 2017

After "Hello World", the first program I write in any new language is a recursive colour generator. Having previously implemented this program in Perl, VB, Java, JavaScript, Euphoria, PHP, Python, POV-Ray, SVG, Moo, Smalltalk, C, R, and Dart, I thought Go would be a good candidate to try next.

At first glance, Go is a cleaner version of C. It will still let you shoot yourself in the foot (e.g. range errors), but it won't let you shoot yourself in the heart (e.g. pointer arithmetic).

The colourful image above is rendered server-side by a Go executable (reload to generate random new colours). Here is the source code: colours.go

< Previous | Next >

Legal yada yada: My views do not necessarily represent those of my employer or my goldfish.