Introduction
Go was built at Google for a specific frustration: large programs that were slow to build and hard to read. The answer was a language that is deliberately small β fewer features, but the right ones, done well.
If you know one programming language already, Go will feel familiar within an hour. The interesting parts are not the syntax, but two ideas: goroutines and channels.
Goroutines: cheap concurrency
Most languages make running things at the same time feel heavy β threads, thread pools, and careful setup. A goroutine is Go's lightweight version: you start one by writing go in front of a function call.
package main
import ( "fmt" "time" )
func say ( text string ) { for i := 0 ; i < 3 ; i ++ { fmt . Println ( text ) time . Sleep ( 100 * time . Millisecond ) } }
func main () { go say ( "hello" ) say ( "world" ) time . Sleep ( 500 * time .β¦