Upload
janet-kuo
View
2.394
Download
1
Embed Size (px)
Citation preview
About meSWE at Google
Open source
Kubernetes written in Go
https://github.com/kubernetes/kubernetes
HistoryStarted at Google
Released, open-sourced in 2009
New, modern
20161945
C
1972
Python
1991
JavaJavaScript
1995
Go
2009
https://golang.org/
Why Go?Google internal needs
★ Efficient large scale programming★ Distributed systems★ Speed of compilation★ Multicore, networked hardware
http://xkcd.com/
Go is… Fast compilation time
Concurrent
Garbage-collected
Modern with support for networked and multi-core computing
General-purpose
Compiled
Statically typed like C, Java
Feels as easy, lightweight as JS, Python
Design PrinciplesSimplicity concepts easy to understand
Orthogonality concepts mix cleanly
Readability comprehensible with little context
Companies Using Go
http://stackshare.io/go/in-stacks
ConcurrencyUNIX: processes connected by pipes
$ find ~/go/src/pkg | grep _test.go$ | xargs wc -l
Go: goroutines connected by channels, concurrency made easy to use
Concurrency philosophy The efficiency of an asynchronous model written in a synchronous style
Connect goroutines with channels -- simpler, maintainable code
Toolinggofmt reformats code
goimports updates import lines
golint prints style mistakes
godoc documentation of packages and symbols
go vet vets the package
go get download and install packages and dependencies
go test automates testing the packages
no more tabs vs. spaces!
no more “import not used”, or “import not found”
Rich library supportComprehensive standard library
150+ packages
Many great external libraries
120, 000+ packages
https://godoc.org/
Go: a general-purpose languageNot just a “systems language”
Unexpected interest from users of scripting languages
Diverse uses across the community
★ Scientific computing★ Web applications★ Graphics and sound★ Network tools★ … and much more
Recap: Go isFast compilation time
Concurrent
Garbage-collected
Modern with support for networked and multi-core computing
General-purpose
Compiled
Statically typed like C, Java
Feels as easy, lightweight as JS, Python
What’s nextA Tour of Go tour.golang.org
The Go Playground play.golang.org
Documentation golang.org/doc
Go Wiki github.com/golang/go/wiki
https://golang.org/