Arto's Notes re: Go

Installation

macOS with Homebrew

$ brew install go
$ export GOPATH=/opt/go
$ export GOROOT=/opt/homebrew/opt/go/libexec
$ export PATH="$PATH:$GOROOT/bin"
$ mkdir -p /opt/go && chown arto:staff /opt/go

Configuration

$ alias repclient='repclient -socksserver 127.0.0.1:9150'

Scripting

Shebang

///usr/bin/env go run "$0" "$@"; exit "$?"

Audience

Much like Java a decade prior, Go was designed by experienced programmers for inexperienced programmers to use:

"The key point here is our programmers are Googlers, they're not researchers. They're typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They're not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt."

"It must be familiar, roughly C-like. Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical."

Critiques

Deficiencies

  • nil handling.
  • Code duplication due to lack of generics.