Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2COBbRN.
Aarti Parikh goes over the Go language design and talks about why Go matters in the age of multicores and cloud-native computing. Filmed at qconsf.com.
Aarti Parikh is a software engineering manager with a decade of experience building teams and products for the Internet, IoT and now Fintech. Currently, she works at PayPal.
Go - A Key Language in Enterprise Application Development?
1. @classyhacker
Go - a key language in
enterprise application development?
Aarti Parikh, Engineering Manager@PayPal
QCon SF 2018
2. InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
go-lang-design
3. Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
4. @classyhacker
Go’s popularity in the last few years is hard to miss. It
has jumped up in the Tiobe index and is holding steady.
The language has had a significant impact on the startup
scene due to its simplicity, speed and enabling
productivity in engineering teams. Large companies are
starting to take notice. We also see a huge amount of
community involvement in Go. If you have lived through
the growth of Java in the late 90’s, this feels a bit like
déjà vu. In this talk, I will go over the Go language
design and talk about why Go matters in the age of
multicores and cloud-native computing.
6. @classyhacker
An enterprise language should
• Be easy to learn,
• Be easy to read, debuggable
• Be safe
• Be stable
• Scale on modern hardware with multi core processors
• Have good tooling
• Dependency management
• Scale across teams with diverse skills
• Be easy to deploy
• Have a strong community
• Have good libraries
7. @classyhacker
Java
• Was created to replace C++
• Write once run anywhere was ground breaking
• Developer productivity
• Static type checking
• Steady growth - first release 1995
• Garbage collection, memory safety allowed focus on business logic
• Stable JVM and continuously improving performance
• Java 2 -> Java 5(Generics)-> Java 8(Lambda)
• Has been backward compatible with every release
• Libraries helped developers hit the ground running
• Easy to learn
• Cheaper development costs
8. @classyhacker
Growth of Java
• Browser applets to Server side
• J2EE to SOA, Web Services, lots of XML
• ORM’s, JBoss Marc Fleury
• JUnit + Xtreme programming, Kent Beck
• Design Patterns, Refactoring, Martin Fowler
• IDE support, Eclipse eco-system, IntelliJ
• Dependency Injection, Spring, AOP
• Dependency management, Maven
• JMS, Active MQ, Message Oriented Middleware
9. @classyhacker
Java problems
• Developer velocity plateaued
• Verbose, Tedious, Repetitive
• Epitome of OOP
• Slow startups times with JBoss, Spring Boot to the rescue
• Oracle taking over Java, license worries
• JVM abstraction - Developers unaware of how their code is
running
• Concurrency (OS threads map to Java Threads)
11. @classyhacker
Rise of Frameworks
• Ruby on Rails, Sinatra, EventMachine
• Express, Meteor, Hapi, Sails, Lodash…
• Django, Twisted
• Succeeding due to community work
12. @classyhacker
Discontent
• Framework fatigue
• Dependency fatigue
• Vulnerabilities
• Single Threaded
• Global interpretor lock
• Callback hell
• Build tools are slow
• Need a book for the good parts
13. @classyhacker
FP on the JVM
• Clojure - 2007
• Scala - 2004
• Expensive development cost
• Hard to learn
• Better concurrency
• Enterprise adoption is limited
• FP purists
• Community
16. @classyhacker
Did the C++ committee really believe that what was
wrong with C++ was that it didn't have enough
features? - Rob Pike
17. @classyhacker
Robert: Starting point: C, fix some obvious flaws, remove
crud, add a few missing features.
Rob: name: 'go'. you can invent reasons for this name but it
has nice properties. it's short, easy to type. tools: goc, gol,
goa. if there's an interactive debugger/interpreter it could
just be called 'go'. the suffix is .go.
Robert Empty interfaces: interface {}. These are
implemented by all interfaces, and thus this could take the
place of void*.
In the end of course it came out quite different
from either C or C++
18. @classyhacker
Simple
• 25 keywords
• Feel like Ruby, Runs like C
• Readability is Paramount - Rob Pike
• Simple code is debuggable
• Simple can be expressive
• Can scale on large codebases with developer churn
19. @classyhacker
Stable
Go 1.11 Release notes
There are no changes to the language spec.
Go 1.10 Release notes
There are no significant changes to the language spec.
Go 1.9 Release notes
There are 2 changes the Language spec.
Go 1.8 Release notes
There is 1 change in the Language spec.
21. @classyhacker
Q. Why is my trivial program
such a large binary?
➔ ls -l
total 3144
-rwxr-xr-x 1 aarti staff 1603520 Feb 2 18:57 helloworld
-rw-r--r--@ 1 aarti staff 72 Feb 2 18:57 helloworld.go
22. @classyhacker
“The linker in the gc tool chain
creates statically-linked binaries by
default. All Go binaries therefore
include the Go run-time, along with
the run-time type information
necessary to support dynamic type
checks, reflection, and even panic-
time stack traces.”
23. @classyhacker
Compiler
Before 1.5 faster, written in C
With Go 1.5 compiler was rewritten from C to Go
`go build -i` Dependency caching
Support for Assembly, Math libraries are in assembly
GOOS
const goosList = "aix android darwin dragonfly freebsd hurd js linux nacl netbsd
openbsd plan9 solaris windows zos “
GOARCH
const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le
mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x
sparc sparc64 wasm "