Significant Whitespace is Still the Devil

Facts from Google:

“We have had extensive experience tracking down build and test failures caused by cross-language builds where a Python snippet embedded in another language, for instance through a SWIG invocation, is subtly and invisibly broken by a change in the indentation of the surrounding code.” — Rob Pike, 2012

Rob is no script kiddy and when—after years of working under developer conditions the rest of the world can hardly imagine—he says whitespace is bad, well, I’ll put my confirmation bias aside and go with his factual, practical experience, as more should.

Standard Formatter Addresses the Real Problem

Sometimes it feels like the entire significant whitespace thing came about because of developer convenience when a simple, standard formatter—that actually uses an AST parser built into the language—would have fixed it. The go fmt tool is one of the most elegant solutions to age-old developer quips I have experienced. No indentation tabs v.s. spaces fights, no style religions, no problem with braces, just pure coding bliss. My favorite is when I don’t even have to :set paste in Go and one :w corrects everything immediately. This is a language and toolset built by well educated and well experienced professionals to solve practical, current and future problems. The beauty of Go is based in this solid fact:

“The goals of the Go project were to eliminate the slowness and clumsiness of software development at Google, and thereby to make the process more productive and scalable. The language was designed by and for people who write — and read and debug and maintain — large software systems.”

The Enterprise Darling CTOs Have Always Wanted

That’s right. We finally have it. A language forged in the fires of the largest IT enterprise suitable for any other that appeases the most academic and the most practical holding the award for most approachable, strictly-typed, compiled language the world has ever seen. This really isn’t hyperbole. These are facts born out with evidence only Google could ever produce.

Sure I’m a Fanboy

Say what you want about Google. This language is the most elegant I have worked with in over 30 years of programming. It is truly remarkable to have witnessed its meteoric rise. Those who choose not to learn it will really miss out. Learning to code in Go instills patterns and practices that will long benefit any programmer no matter what other languages they later choose to program in as well. I confess I have a hard time picking any other language but shell or, of course, the web languages. Python still holds value as an easy, untyped first language as well as an embedded, quick script, language and will for a long time. As crazy as it sounds to some, I truly believe Go will dominate even the domains of back end web, as well as data science and machine learning eventually because ultimately the people making the big money decisions will want what Go has to offer.

Like what you read? Give Rob Muhlestein a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.