Hello, future programmers! Are you ready to dive into a new programming adventure? Today, we'll be taking a look at the basics of Go programming — syntax and comments — where you'll write your first, simple Go program.
Go, also known as Golang
, is a statically typed, compiled language developed at Google. It's known for its simplicity, efficiency, and ease of use. Notably, Go
is widely used for concurrent programming, thanks to its advanced features such as Goroutines
and Channels
.
Just as English has rules that we call grammar, Go
has its own set of regulations known as syntax. Let's get started!
In Go
, we use statements to perform actions. These are usually terminated by a new line or a semicolon (;
). The semicolon in the end of the statement is optional and used rarely. Go
uses curly braces ({ }
) to group statements into blocks.
Take a look at this simple Go
syntax example:
