In the early days of computers, programmers wrote code in machine code. It is a complicated and difficult way of programming, but it gives you full control over the machine. Later, higher level languages were invented. One of those, C, became a very popular programming language in the 1980’s. It was easy to learn and close enough to the hardware that you could use it for system-level programming, like for example developing an operating system, a device driver or inner loops in a game engine. Its successor C++ is more or less a superset of C and can be used just as well for system-level programming.
During its heydays C was also used for more “regular” programming, but today most business-level code is written in higher level languages. There is still need for system-level programming, but many programmers feel that C is too low-level and C++ is too complicated. There seems to be a market for a programming language that is low-level enough to give good control over the hardware, while being easy to use and designed for modern development situations.
It is in light of this we need to see Google’s programming language Go that has gained a lot of attention lately. It promises to be a system-level language that is simple, fast and safe and has good support for concurrency. They also claim Go is a joy to use.
System-level programmers should be happy, right? Not so much.
The reaction from people who have actually taken the time to read the documentation on the Go site hasn’t been overwhelmingly positive. Most comments I have seen have been more along the lines of “another language — so what?”
The reason is that Go is far from the first language that tries to be a successor to C and C++. Here’s just a few other languages that I can think of:
Of those, D is often mentioned as a worthy successor of C and C++, but none of these languages has received very much traction. C and C++ still rule; old, ugly and complicated as they may be.
In my opinion Go has several improvements over C++, like modules (which tremendosly reduces compilation time for large projects), a first-class array type, and good concurrency support using so called goroutines. Unfortunately, Go doesn’t innovate very much in other areas, and misses some features that even C++ has. Compared to D, Go misses even more useful features.
From a purely technical view, I would still prefer programming in Go rather than in C or C++. But chosing a programming language is about so much more than the features of the languages themselves. C and C++ are more mature and well-known and have plenty of code written in them. Switching to a new programming language is not an easy choice to make in important projects.
So why do we care about Go at all when there have been other languages that tried (and failed?) to replace C++? The only reason I can see for the attention Go has received is its association with the Google brand. Its feature set alone is not impressive enough to warrant a switch for most system-level programmers.
But who knows, Go may become popular just because it’s a Google product. All for the better. The world needs a modern system-level language. I’m just hoping that it will be a bigger step from C than Go currently is.