Sign up FAST! Login

"Why Learn Go?" Interview with Rob Pike


Stashed in: Cloud, Software!, Learn!, Big Data!, Go

To save this post, select a stash from drop-down menu or type in a new one:

Summary of the video:

Go was built at Google by Rob Pike, Robert Griesemer, and Ken Thompson. At the time, Google was using mainly Java and C++ for its Big Data server clusters, but Pike, Griesemer, and Thompson felt that these languages were no longer meeting their needs. They were unwieldy and the projects took forever to compile. In Rob's word, these languages do not provide the "fluidity and ease of construction" that he would like. They felt that the time was right to build a next-generation compiled language optimized for Cloud Computing and Big Data.

The language would need to be highly efficient, be suitable for very large projects with lots of devs working on them, and work well in a highly distributed computing environment.

Go!

Go is the language they came up with. Though he doesn't really address in the video exactly how Go is better for large teams of developers working on a single, large project, Rob does say that Go yields compile times that are orders of magnitude smaller than you'd see with C++. The improved efficiency comes primarily from a re-thinking of dependency management, so that imported files get analyzed by the compiler only once. By contrast, in a large C++/Java project, a given lib file may be included in hundreds of other files, and the compiler must therefore try compiling both with and without the lib file to see whether the include is really necessary, or whether it is already included ancestrally through another import. The Go dependency management system takes the burden off of the compiler, and apparently works so well that most projects compile in under a second, and might even compile faster than a scripting language's interpreter could start up.

Pretty neat stuff!

I saw Rob give a talk on Go at a Heroku conference. He analogized the language to a team of gophers trying to carry books around in carts to burn them. Here is the preso:

Concurrency is not Parallelism (it's better)

From the preso:

OUR PROBLEM

Move a pile of obsolete language manuals to the incinerator.

With only one gopher this will take too long.

MORE GOPHERS

More gophers are not enough; they need more carts.

More gophers are not enough; they need more carts.

MORE GOPHERS AND MORE CARTS

This will go faster, but there will be bottlenecks at the pile and incinerator.

This will go faster, but there will be bottlenecks at the pile and incinerator.

Also need to synchronize the gophers.

A message (that is, a communication between the gophers) will do.

DOUBLE EVERYTHING

Remove the bottleneck; make them really independent.

This will consume input twice as fast.

This will consume input twice as fast.

He goes on like this for some time, getting ever more elaborate gopher configurations, until:

OUR DIFFERENT WAY

Bring the staging pile to the multi-gopher concurrent model:

Our different way

FULL ON OPTIMIZATION

Use all our techniques. Sixteen gophers hard at work!

full on optimization

That is a LOT of gophers.

Why are they burning books? Are they right-wing gophers?

People ask me all the time why I use Go.

The most succinct explanation I've been able to come up with is this:

Python and Ruby are the fastest way to turn ideas into code.

Go is the fastest way to turn ideas into working products.

Ha! Well said and I'm sure Ruby and Python bigots would flame us... :)

You May Also Like: