Pages, some stolen, some original

Saturday, March 5, 2016

Go Programming Language

I thought I would make an attempt to learn Go, Google's programming language. I'm wading through the Tour of Go and it is a bit of a slog, not really holding my interest. Let's see if I can take a simple minded C program and rewrite it using Go. The original is only 45 lines, the problem it handles is rudimentary. How hard can it be? Well, if you don't have a good reference, almost impossible. So I start looking for something more useful and I come across this page which includes this bit:

Introduction

Go is a new language. Although it borrows ideas from existing languages, it has unusual properties that make effective Go programs different in character from programs written in its relatives. A straightforward translation of a C++ or Java program into Go is unlikely to produce a satisfactory result—Java programs are written in Java, not Go. On the other hand, thinking about the problem from a Go perspective could produce a successful but quite different program. In other words, to write Go well, it's important to understand its properties and idioms. It's also important to know the established conventions for programming in Go, such as naming, formatting, program construction, and so on, so that programs you write will be easy for other Go programmers to understand.
This document gives tips for writing clear, idiomatic Go code. It augments the language specification, the Tour of Go, and How to Write Go Code, all of which you should read first.
I'm putting it here in my blog because it has links that might be useful and also so I can find it. My bookmark bar runneth over.

No comments:

Post a Comment