Pro Yearly is on sale from $80 to $50! »

Introduction to The Go Programming Language

Introduction to The Go Programming Language

A quick look at Go and what makes it special.

Icons: @iconmonstr
Photos: http://peterhellberg.vsco.co/

8d7c0c3b32899cccf8d0abb080a18c20?s=128

Peter Hellberg

October 25, 2013
Tweet

Transcript

  1. Introduction to The Go Programming Language

  2. @peterhellberg

  3. September 21, 2007

  4. March 28, 20

  5. Go 1

  6. What is Go?

  7. Go is about composition, concurrency, and gophers. ! Keep that

    in mind.
  8. Composition

  9. Go is Object Oriented, but: - NO classes - NO

    subtype inheritance - Interfaces are satisfied implicitly
  10. None
  11. A statically-typed language with syntax loosely derived from that ofC

  12. Concise variable declaration and initialization through type inference (x :=

    0 not int x = 0)
  13. Built-in concurrency primitives: - goroutines - channels - select

  14. CSP http://en.wikipedia.org/wiki/Communicating_sequential_processes

  15. None
  16. A fully garbage collected language With complete control over memory

    layout.
  17. Compilation Cross c

  18. Native machine code (32-bit and 64-bit x86, ARM)

  19. None
  20. None
  21. ‘Batteries included’ standard library

  22. net archive database crypto encoding unicode compress

  23. None
  24. None
  25. Hello World!

  26. package main ! import “fmt" ! func main() { fmt.Println(“Hello

    World!”) }
  27. Hello World! delivered over HTTP

  28. package main ! import ( “fmt" “net/http" ) ! func

    main() { http.HandleFunc(“/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, “Hello", r.URL.Path[1:]) }) ! http.ListenAndServe(“:8080", nil) }
  29. curl http://:8080/World! go run hello_server.go

  30. 25 50 75 100 Oct 09 Oct 10 Oct 11

    Oct 12 Oct 13 Popularity Numbers represent search interest relative to the highest point on the chart.
  31. – gobyexample.com cAB Reading material BDa – learnxinyminutes.com/docs/go – golang.org/doc