http://golang.org
Sunday, October 3, 2010
http://golang.org Sunday, October 3, 2010 The Expressiveness of Go - - PowerPoint PPT Presentation
http://golang.org Sunday, October 3, 2010 The Expressiveness of Go Rob Pike JAOO Oct 5, 2010 http://golang.org Sunday, October 3, 2010 Who 2 Sunday, October 3, 2010 Team Russ Cox Robert Griesemer Rob Pike Ian Taylor Ken Thompson
http://golang.org
Sunday, October 3, 2010
http://golang.org
Sunday, October 3, 2010
2 Sunday, October 3, 2010
3
Sunday, October 3, 2010
4
Sunday, October 3, 2010
5
Sunday, October 3, 2010
6
Sunday, October 3, 2010
7
Sunday, October 3, 2010
8
Sunday, October 3, 2010
9
Sunday, October 3, 2010
10
Sunday, October 3, 2010
11
Sunday, October 3, 2010
12
* extra count is for reserved words and alternate spellings
Sunday, October 3, 2010
13
Sunday, October 3, 2010
14
Sunday, October 3, 2010
15
Sunday, October 3, 2010
16
Sunday, October 3, 2010
17
Sunday, October 3, 2010
18
Sunday, October 3, 2010
19
Sunday, October 3, 2010
20
Sunday, October 3, 2010
21
Sunday, October 3, 2010
22
Sunday, October 3, 2010
23
@mjmoriarity: The way Go handles interfaces is the way I wish every language handled them.
Sunday, October 3, 2010
24
Sunday, October 3, 2010
25
Sunday, October 3, 2010
26
Read(p []byte) (n int, err os.Error) // two return vals } // And similarly for Writer
var bufferedInput Reader = bufio.NewReader(os.Stdin)
Sunday, October 3, 2010
27
type Encoding interface { ReadRequestHeader(*Request) os.Error ReadRequestBody(interface{}) os.Error WriteResponse(*Response, interface{}) os.Error Close() os.Error }
func sendResponse(sending *sync.Mutex, req *Request,
reply interface{}, enc *gob.Encoder, err string)
func sendResponse(sending *sync.Mutex, req *Request,
reply interface{}, enc Encoding, err string)
Sunday, October 3, 2010
28
Sunday, October 3, 2010
29
Sunday, October 3, 2010
30
Sunday, October 3, 2010
31
Sunday, October 3, 2010
32
Sunday, October 3, 2010
33
Sunday, October 3, 2010
34
Sunday, October 3, 2010
35
Sunday, October 3, 2010
36
type Work struct { x, y, z int }
func worker(in <-chan *Work, out chan <- *Work) { for w := range in { w.z = w.x * w.y
} }
func Run() { in, out := make(chan *Work), make(chan *Work) for i := 0; i < 10; i++ { go worker(in, out) } go sendLotsOfWork(in) receiveLotsOfResults(out) }
Sunday, October 3, 2010
37
Sunday, October 3, 2010
38
Sunday, October 3, 2010
39
Sunday, October 3, 2010
40
Sunday, October 3, 2010
41
Sunday, October 3, 2010
42
Sunday, October 3, 2010
43
Sunday, October 3, 2010
44
Sunday, October 3, 2010
45
Sunday, October 3, 2010
46
Sunday, October 3, 2010
http://golang.org
Sunday, October 3, 2010
http://golang.org
Sunday, October 3, 2010