Go notes

Rob Pike - What We Got Right, What We Got Wrong | GopherConAU 2023

This is a very good talk and full of good lessons and wisdom.

Summary:

Got right

  • A formal language specification, which made behavior precise and enabled multiple implementations.
  • Multiple compilers, which helped refine the language and proved the spec was solid.
  • Cross-compilation and portability, making it easy to build for different targets.
  • The compatibility guarantee, which kept releases from breaking existing code.
  • A strong standard library, especially for server-oriented development.
  • Easy-to-parse syntax and excellent tooling support.
  • gofmt, which standardized formatting and influenced the wider programming community.
  • Concurrency as a first-class language feature, especially useful for server software.
  • Interfaces, which became a core design concept for composition and library design.
  • The early decision to bootstrap the compiler in C, then later translate it to Go.
  • Open-source release strategy, and the eventual strength of the community around Go.
  • The Go playground and executable docs, which made experimentation and learning much easier.

Got wrong

  • The mascot licensing/attribution situation, which sometimes caused credit and reuse problems.
  • Communication of the project’s real goals, which were broader than “just a language.”
  • Concurrency messaging, especially the lack of clarity about server use cases versus general use.
  • The distinction between concurrency and parallelism, which was explained too late.
  • The path to generics, which took too long and was constrained by earlier design choices around interfaces.
  • Package/dependency management, which was bumpy and not handled well from the start.
  • Community engagement around package management, which left some contributors feeling slighted.
  • Documentation depth, especially the early lack of simple usage examples.
  • The early open-source/community process, where communication and expectations were often mismatched.

Biggest takeaway

Rob Pike’s main point is that Go’s success came from treating it as a system for building software, not just a language: the spec, tooling, formatting, compatibility, and community mattered as much as syntax.

Quotes

that’s not what the whole project was about our original goal was not to create a new programming language it was to create a better way to write software.

It’s a mistake common to Engineers everywhere to confuse the solution and the problem - sometimes the proposed solution is harder than the problem it addresses, and it can be hard to see there is an easier path.

But here we are 14 years after the launch and it’s fair to say that overall it’s a pretty good place largely because of the decisions we made through the
design and Development Goal as a way to write software not just as a programming language we have arrived somewhere novel.

We got here in part because of

  1. A strong standard library that implements most of the basics needed for Server code concurrency is a first class component of the language
  2. An approach based on composition rather than inheritance.
  3. A packaging model that clarifies dependency management integrated fast build and testing tools rigorous consistent formatting.
  4. A focus on readability over cleverness.
  5. A compatibility guarantee.
  6. And most of all because of the support of an unbelievably helpful and diverse community of gophers.

Perhaps the most interesting consequence of these matters is that go code looks and works the same regardless of who’s writing it is largely free of factions using different subsets of the language and is guaranteed to continue to compile and run as time goes on. That may be the first for a major programming language. We definitely got that right. Thanks.

In the previous talk, Rob references this talk/article as the best explanation of why Go happened.

Go 1.27 is out :tada:

The Go team shipped version 1.27 today, generic methods have finally landed, alongside two other language tweaks: struct literals can now initialize embedded or nested fields directly by selector, and type inference for generic functions now works everywhere assignment happens — composite literals, conversions, even channel sends.

The standard library picks up some long-awaited additions too: encoding/json/v2 (with the classic encoding/json now running on the v2 engine under the hood for faster unmarshaling), a native uuid package, post-quantum ML-DSA signatures via crypto/mldsa, and experimental simd packages.

On the runtime side, size-specialized allocation cuts the cost of small-object allocations by up to 30%, and the now-generally-available goroutineleak pprof profile can automatically flag permanently blocked goroutines.

Grab it from All releases - The Go Programming Language and read the full announcement at Go 1.27 is released - The Go Programming Language

1 Like