takes cues from languages like JavaScript and Python • Provides the power of a compiled language with the development ease of a scripting language • Cross-platform, open-source
at end of line ◦ Enforces curly brace style • Statically typed, with type inference • Allows for multiple returns and assignments • Pointers but no pointer arithmetic • Garbage collected
uint uint8 uint16 uint32 uint64 uintptr byte // alias for uint8 rune // alias for int32 // represents a Unicode code point float32 float64 complex64 complex128
for some form of inheritance (but not polymorphism) type Threeple struct { Tuple third int } func main() { foo := Threeple{Tuple{1, 2}, 3} fmt.Printf("%d %d %d\n", foo.first, foo.second, foo.third) } //prints 1 2 3
most OO languages like Java. • After an interface is defined, any struct which implements the defined methods is automatically a member of that interface
asynchronously with the keyword "go", ex: ◦ go foo() • Communication between Goroutines occurs over channels ◦ x := <- chan //Receive a value from channel chan
the garbage that accumulates in a language over the years ◦ Built from a modern perspective as a general-use language • Feature-rich ◦ Full closures, built-in concurrency support • Minimal, "friendly" syntax • Fast, compiled
◦ Relatively fewer developers ◦ Language likely to change within the next few years ◦ Uncertain future • Missing some features ◦ Generics, real inheritance, • Exception model ◦ Error code checking can be just as bad as try/catch ◦ Scraps the idea of exceptions instead of fixing them