Slide 1

Slide 1 text

LET’S GET GOING! ABU ASHRAF MASNUN

Slide 2

Slide 2 text

QUICK INTRODUCTION • Developed at Google • Ken Thompson, Rob Pike, Robert Griesemer • Started as an experiment in 2007, Announced in 2009 and 1.0 came in 2012 • Replacement for C++ but now attracts people from all sorts of languages • Easy to learn, reason about, statically compiled yet productive

Slide 3

Slide 3 text

WHY I LIKE IT? • Tooling & stdlib • Simple & Easy to Learn • Very very fast & Low memory foot print • Built for system programming / Networking • Concurrency • Single Binary & Cross Compilation • Dependencies from VCS

Slide 4

Slide 4 text

TOOLING • go run • go build • go install • go fmt • go get • go test • and others

Slide 5

Slide 5 text

STANDARD LIBRARY • Batteries included (almost) • Many packages for common tasks • Modern day stdlib for a modern day language • System, networking, web development well covered

Slide 6

Slide 6 text

SIMPLICITY • Intentionally kept less expressive • The language is relatively small • Less memorization • Easier to read & Maintain

Slide 7

Slide 7 text

EASY TO LEARN • Designed for new, fresh graduates • The official specification is less than 40 pages • Very small number of built in keywords • One type of loop • The documentation is very detailed • “Effective Go” • Friendly community

Slide 8

Slide 8 text

FAST & LIGHTWEIGHT • Destroys the dynamically typed languages • Surpasses Java easily (and consumes far less memory) • Sometimes beats C/C++

Slide 9

Slide 9 text

SYSTEM / NETWORK PROGRAMMING • You can easily build low level systems • The GC can be a problem • Excellent support for network programming

Slide 10

Slide 10 text

CONCURRENCY • Why is Concurrency Important? • Go routines • Low overhead • Easy to Spawn • M:N Scheduling • Channels • Bi directional communication • select

Slide 11

Slide 11 text

SINGLE BINARY & CROSS COMPILATION • You can generate a single binary executable. • You can embed resources into it easily (packing). • Cross compile on major platforms. • Cross compilation would not work on CGO.

Slide 12

Slide 12 text

VCS & DEPENDENCY MANAGEMENT • You can directly install packages from git / hg • Does not scale well for teams • Vendoring is introduced • I use “Glide” • New solutions are coming

Slide 13

Slide 13 text

WAR STORIES • Iron.io • Disqus • Uber / Grab • Google

Slide 14

Slide 14 text

WHEN NOT TO USE GO?

Slide 15

Slide 15 text

LEARNING RESOURCES • Go Tour (comes as command line tool, too!) • Effective Go • Go By Example • Go Documentation

Slide 16

Slide 16 text

http://masnun.rocks