Golang Project Structure

Tips and tricks for writing and structuring Go code

A Few Words of Wisdom

Language

  • unknown

by

Languages that try to disallow idiocy become themselves idiotic.

Rob Pike, one of the creators of the Go programming language

Many programming languages — such as C++ or Java, for example — introduce all kinds of complex abstractions that are intended to stop the person writing code in the language from doing something that they may not actually ever try to do. In other words, the compiler and standard library are built around the idea that they’re always and inevitably going to be better than the programmer who uses them!

A man holding a banana as though it were a lethal weapon.
I’ve got a banana and I’m going to use it!

Golang takes a middle path: it offers just enough abstraction to keep us from needing to worry about low-level memory management or pointer arithmetic, but it doesn’t forbid us from accessing the bare metal of the machine, if that’s what we really want. It even gives us a package named unsafe, because the language accepts that sometimes we might just know best. That’s a pretty good philosophy.

Leave a Reply

Your email address will not be published.