ato 2014 - so you think you know 'go'? the go programming language

34
Presented by John Potocny @ATO 2014 So you think you know ‘Go’? The Go Programming Language

Upload: john-potocny

Post on 27-Jun-2015

299 views

Category:

Software


1 download

DESCRIPTION

What’s so special about Go? Why do people swear they’ll never develop in any other language again? You’ve probably heard a lot of the stock answers: concurrency, lightweight syntax, speed, blah, blah. What do these things _mean_ to you as an individual developer, to your code and work output, and to your team and company? Much of Go’s real power is hidden in plain sight, overlooked and unappreciated because it’s too simple to appear significant. I know because I have written a variety of Go code for many different domains, from stats to long-running daemons to API servers and clients. Long after I thought I was good with Go, I continued to experience a-ha moments that made me realize I’m still learning a lot of it. That process continues today. I am not the world’s best programmer in any language, but I’m pretty self-aware, and if you’re anything like me, sharing my experience with you can hopefully help you shortcut the process of ignoring Go’s true power. I also hope that you’ll gain perspective about common complaints, and perhaps understand how serious those things would be for you after using Go for a while.

TRANSCRIPT

Page 1: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Presented by John Potocny @ATO 2014

So you think you know ‘Go’?The Go Programming Language

Page 2: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

About MeBackend Developer at VividCortex, BCE from Kettering UniversityProgramming Experience: Mainly C#/Java, Embedded C/C++, some Python

Twitter: @JohnPotocny1Email: [email protected]

Page 3: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

A Brief History● Created in 2007 by Robert Griesemer, Rob Pike, & Ken Thompson● Developed by Google● Open Source - since Nov 10, 2009 (Public Announcement)● Currently v1.3.3 (Stable)

Page 4: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

What Kind of Language is Go?

Page 5: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Language Features

Page 6: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Actually, It’s More Like This

Page 7: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Great Tools Built-In

Page 8: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Compiles Quickly - Native Binary

Page 9: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Garbage Collected

Page 10: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Statically Typed

Page 11: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Interfaces and Composition

Page 12: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Concurrency

Page 13: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

What Did Go Get Rid Of?

Page 14: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Remember The Goals!

Page 15: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Enough Chat, Let’s See Some Code!

Page 16: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

A “Modern” Hello World

Page 17: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

A “Modern” Hello World

Page 18: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

How About a Real Example?

Page 19: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

How About a Web Server?http://play.golang.org/p/r-__BazPxE

Page 20: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

How About a Web Server?http://play.golang.org/p/r-__BazPxE

Or Even:

Page 21: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Server With Limited Connections?http://play.golang.org/p/OMian3YwlD

Page 22: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

No Language Is Perfect...

Page 23: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

A Fun Example

http://play.golang.org/p/kPFCYuNTTG

Page 24: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Other Things?

Page 25: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

No Generics

Page 26: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Go Has Complex Numbers

Page 27: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Static Types - No Implicit Conversion

Page 28: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
Page 29: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Strict Compiler Interrupts Flow

Page 30: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Race Conditions Still Exist

Page 31: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Wait, Go Has ‘goto’!?

Page 32: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Other Fun Keywords

Proof: http://play.golang.org/p/dFBcMMHq0a

Page 33: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Questions?

Page 34: ATO 2014 - So You Think You Know 'Go'? The Go Programming Language

Thank You!