##Table of contents
Big Concepts
Go has types (everything is a type), and behavior emerges from methods and interfaces, not from classes.
[!TIP] bar baz
Composition over Inheritance
There’s only structs, interfaces. Composition over inheritance. Implicit interfaces allows for dependency injection; in other words, no coupling at all. Behavior is completely separated.
- Everything is passed by value. This defaults all operations to be copies and thus, Pointers are just a value, a memory address.
*
&
Pointers are values and references semanitcs are explicit
Explicit error handling
Errors are values (if err != nil), no exceptions.
Simplicity over expressiveness
Fewer language features, predictable code.
Concurrency is built-in
Goroutines and channels are first-class.
Small, behavior-focused interfaces
Interfaces define what you do, not what you are.
Tooling is part of the language
go build, go test, go fmt, go mod are standard.
Readability and uniform style
gofmt enforces consistency.
Fast compile, simple runtime
Efficient binaries, GC, lightweight scheduling.