Recs.
Updated
SpecsUpdate
Pros
Pro Great language for building networking services
Go was started as a systems language but now it has fully committed in the niche of networking services. This has been a brilliant move by Go because it allows them to capitalize on the immense talent of the Go engineering team (who are in the most part network engineers).
In a world dominated by Java EE and slow scripting language, Go was a breath of fresh air and it continues to be one of the most powerful languages if you want to build networking services.
Pro Intuitive concurrency
With goroutines
it's easy to create a lightweight thread. Go was designed with concurrency in mind, which makes it an ideal language for creating servers which need to deal with many connections coming in at once. It makes it a great introduction to parallelism and writing highly scalable web apps.
Pro Pragmatic minimalism
What's best about Go is what isn't in there. What they took out because the language is better without it. Go represents a ressourcement, a rethink of language design. It's minimalist , spare (compared to C++, and Java) and yet it is imperative and similar in many ways to C and C# family languages, so it's not as ultra-minimalist as LISP.
Pro The go compiler compiles binaries instantly — as fast as a scripting language interpreter
Compiled binaries are fast — about as fast in C in most cases. Compiles on every OS without effort — truly cross-platform compiler. As a result of the fast compilation speed, you can use the gorun program to use go source code as if it was a scripting language. The workflow is comparable to that of a scripting language.
Pro Exceptionally simple and scalable multithreaded and concurrent programming
Simply prepend a function with go to execute it concurrently. Utilizes channels for communication between goroutines which aids to prevent races and makes synchronizing threads effortless. The maximum number of threads to use may be defined at compile time, even if that is limiting goroutines to run on one thread.
Pro Simple high level programming language
The grammar is compact and clear. Features are powerful and consistent. The learning curve is very friendly.
One can focus on the main concepts and ignore unimportant details. It is a nice compromise between Python and C worlds.
Pro Syntax for exported code from a package is simplified to be less verbose than other languages
Any variable, type and function whose name begins with a capital letter will be exported by a project, while all other code remains private. There is no longer a need to signify that a piece of code is 'private' or 'public' manually.
Pro Demonstrates a unique, simple concept to OOP and duck typing
All types are essentially objects, be they type aliases or structs. The compiler automatically associates types to their methods at compile time. Those methods are automatically associated to all interfaces that match. This allows you to gain the benefits of multiple inheritance without glue code. As a result of the design, classes are rendered obsolete and the resulting style is easy to comprehend.
Basically, interfaces are compatible by structure, which allows "duck typing".
Pro Supports 'modules' in the form of packages
Every Go source file contains a package line that indicates which package a file belongs to. If the name of the package is 'main', it indicates that this is a program that will be compiled into a binary. Otherwise, it will recognize that it is a package.
GoLang has explicit package-level export/import. Package dependency graph (DAG) defines the order of compilation and initialization. Packages help to build the architecture and to deal with the complexity of the system.
Packages and clear dependancies makes it easy to understand the system (design).
Proper support of modules (packages) make the compiler super-fast, since it can easily tell which packages must be recompiled.
Pro API documentation is rich in content; easy to memorize
Only features deemed critical are added to the language to prevent cruft from working it's way into the language. The language is small enough to fit inside one's head without having to repeatedly open documentation. Documentation is hosted on an official webpage in a manner that is simple to read and understand.
Pro Easy to install and configure; simple to compile software
Go software can be immediately installed, regardless of your operating system, package manager, or processor architecture with the go get command. Software is compiled statically by default so there is no need to worry about software dependencies on the client system. Makefiles and headers are no longer necessary, as the package system automatically resolves dependencies, downloads source code and compiles via a single command: go build.
Pro Demonstrates a unique, simple concept to object-oriented programming
All types are essentially objects, be they type aliases or structs. The compiler automatically associates types to their methods at compile time. Those methods are automatically associated to all interfaces that match. This allows you to gain the benefits of multiple inheritance without glue code. As a result of the design, classes are rendered obsolete and the resulting style is easy to comprehend.
Pro Simple infrastructure and tooling
The standard tools: go-build/test/get/install are very fast and powerful. GoLang community developed many additional tools for vendoring and static analysis.
The reasons for simple infrastructure came from the language properties: proper implementation for modules (packages), static linkage, static types, and regular compact grammar.
Pro Discourages creating too many packages/modules
Go software is often very flat in structure, without large hierarchies in the directory structure. This makes it easier to navigate using simple CLI tools, and encourages the developer to really think about whether a new module is necessary.
Cons
Con Doesn't have true enums
Golang does weirdness with const versus having real enums, like other languages. This reflects the stubbornness and shortsightedness of the core developers, similar to the issue with generics, where it was denied that it was needed until it became too obvious that it should have been added years ago.
Con Designed to make the programmer expendable
Go was designed for large team projects where many contributors may be incompetent. That Go can still get things done under these conditions is a testament to its utility in this niche. Go's infamously weak abstraction power is thus a feature, not a bug, meant to prevent your teammates from doing too much damage. This also means any team member can be easily replaced by another code monkey at minimum cost. Good for the company, bad for you. The more talented programmers, on the other hand, will be very frustrated by having one hand tied behind their back.
Con It appears Google uses position to snuff out or suppress other languages
Newer languages that could threaten Golang (or other Google controlled languages) appear to have suppressed search results on Google and YouTube. Dangerous situation where large company can manipulate user choice and market share. The freedom to freely choose and user rights need to be protected.
Con Performance slowdown because of indirect calls and garbage collection
Practically no meaningful Go application can be written without indirect function calls and garbage collection, these are central to Go's core infrastructure. But these are major impediments to achieving good performance.
Con Implementation of interfaces are difficult to figure out
Finding out what interfaces are implemented by a struct requires a magic crystal ball. They are easy to write, but difficult to read and trawl through.
Recommendations
Comments
Flagged Pros + Cons
Con Hard to abstract even the simplest notions
Go is famously regarded as very simple. However, this simplicity becomes problematic in time. Programmers who use Go find themselves over and over again writing the same thing from a very low point of view. Domains not already served by libraries that are easy to glue are very difficult to get into.
Con Go relies on third party tools, like Kubernetes, to add things like fault-tolerance and scalability
Go is missing some key features when it comes to fault-tolerance and scalability and has to rely on other third-party tools to provide what comes in the box with other languages.
Pro Supports functional programming techniques such as function literals
This naturally also supports first class and high order functions, so you may pass functions as variables to other functions.
Pro Built-in unit testing
The idiomatic approach to writing a Go software project is to perform test-driven development with unit testing. Every source code file should have an associated *_test.go
file which tests functions in the code.
Pro Provides tools for automatically formatting code for your entire software project
This helps keep every programmer on the same page in a project and eliminates arguments over formatting styles.
Pro Programmers don't have to argue over what 10% subet of the language to implement in their software project
The language promotes programming in a specific idiomatic style, which helps keep every programmer on the same page.
Con No forms designer
Not that important for a server side programming language of course.
Con Processes in Go are a bit bloated
Compared to other languages, like Elixir, Go's processes take 10 times the memory.
Con Requires specific directory structure and environment variable settings
Too much knowledge required for a first programming language.
Con Expects prior familiarity with tooling, "advanced" OS use
A standard step of even installing Go is modifying your path -- a person who's encountering their first language might not even understand. It's hard to escape using Go without familiarity with using build tools, managing and organizing project directories, etc. It's not as simple as Python's "just run the .py file with the interpreter."
Out of Date Pros + Cons
Con Dependency management isn't the best
Dependency management in Go isn't as robust as other languages, like Ruby and Elixir.
Con Forking is more painful than it needs to be
Because of the way Go uses URLs to handle packages, you have to rename all your imports for the package you are forking to match the new URL.
Con Improper support for all the features of coroutines
Because of the half-baked coroutines, you end up mucking around with wakelocks.