Chapter 1. let’s get going: Syntax Basics
Are you ready to turbo-charge your software? Do you want a simple programming language that compiles fast? That runs fast? That makes it easy to distribute your work to users? Then you’re ready for Go!
Go is a programming language that focuses on simplicity and speed. It’s simpler than other languages, so it’s quicker to learn. And it lets you harness the power of today’s multicore computer processors, so your programs run faster. This chapter will show you all the Go features that will make your life as a developer easier, and make your users happier.
Ready, set, Go!
Back in 2007, the search engine Google had a problem. They had to maintain programs with millions of lines of code. Before they could test new changes, they had to compile the code into a runnable form, a process which at the time took the better part of an hour. Needless to say, this was bad for developer productivity.
So Google engineers Robert Griesemer, Rob Pike, and Ken Thompson sketched out some goals for a new language:
Fast compilation
Less cumbersome code
Unused memory freed automatically (garbage collection)
Easy-to-write software that does several operations simultaneously (concurrency)
Good support for processors with multiple cores
After a couple years of work, Google had created Go: a language that was fast to write code for and produced programs that were ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access