SlideShare a Scribd company logo
GO: What’s Different ?
Tarun Vashisth
28th Sep 2018
Contents
• Programming Languages
• History
• Challenges
• Concurrency
• Object Oriented Design
• Type system and more
• Presence
• References
Languages
History
• 1950’s: Fortran, Lisp, Algol, Cobol
• 1960-70’s: B, Pascal, C, Prolog, SQL
• 1980’s: C++, Ada, Matlab, Erlang, Perl
• 1990’s(Internet age): Haskell, Python, VB, R, Ruby, Java, PHP,
JavaScript
• 2000’s: ActionScript, C#, D, Groovy, Scala, Clojure, Go, Rust, Kotlin,
Swift
• CULTURE ?
Challenges: Hardware limitations
• A fundamental turn towards concurrency in software
• Well, 3GHz CPUs -> 2004 and today -> MacBookPro@2.7GHz.
Challenges: Hardware limitations
• Resort to multicore
• Cannot scale indefinitely
• Comes with synchronization overhead between the operations.
• Increase transistor per unit area on chip?
Challenges: Multithreaded design
• Traditional programming languages -> 90’s -> traditional single-
threaded processes.
• Multi-threading
• Messy, complicated and expensive.
• Significant setup and teardown costs.
• We cool ?
Challenges: Multithreaded design
• Real problem:
• Concurrent execution
• Threading-locking
• Race conditions
• Deadlocks.
• Go: Designed keeping in mind multiple cores
• Famous paper “Communicating Sequential Processes” by C.A.R.
Hoare
Node.js: I don’t block
• Relatively easy to write and run
• Awesome V8 engine
• Event loop with promises
• NodeJS is single-threaded.
• It cannot directly use multi-core CPUs even though it is possible to
spawn different processes on several threads.
Node.js single threaded model
Go
• 2009 at Google by Rob Pike, Ken Thompson, Robert Griesemer.
• Primary motivation: Shared dislike of C++
• Slow compile times
• Standard Library offers no real support for Unicode
• Code bloat etc..
• Go is targeted as a modern C and especially as a replacement for C++.
Go
• Rethinks the traditional object-oriented development
• Effectively use all of the cores on your expensive server
• Go has a concise syntax with few keywords to memorize
• Fast complier: compiles to machine code
• Built in concurrency. NO to special threading libraries
Go: What's Different ?
Go
• Simple and effective type system
• Garbage collector: don’t have to manage your own memory.
• Spend less time waiting for your project to build
• Looks at the library that you directly include, rather than traversing
the dependencies of all the libraries that are included in the entire
dependency chain like Java, C, and C++.
• Taste: Objected Oriented and Functional Programming
Go: What's Different ?
Concurrency
• Concurrency vs Parallelism ?
• Concurrency: Programming as the composition of independently
executing processes.
• Parallelism: Programming as the simultaneous execution of (possibly
related) computations.
• Concurrency is about dealing with lots of things at once.
• Parallelism is about doing lots of things at once.
• Concurrency is about structure, parallelism is about execution.
Go: What's Different ?
Go supports concurrency
• Go provides:
• concurrent execution (goroutines)
• synchronization and messaging (channels)
• multi-way concurrent control (select)
• Goroutines come with built-in primitives to communicate safely
between themselves (channels).
• A single goroutine can run on multiple threads. Goroutines are
multiplexed into small number of OS threads.
• Goroutine is very cheap: 2kb vs 1MB(Java)
Objected Oriented Design
• No Inheritance ! No multi Inheritance problem.
• Go developers simply embed types to reuse functionality in a design
pattern called composition
• Interface: Allows you to model behavior
Type System and more
• Short variable declaration operator (:=)
• type interface{}
• Structs
• Anonymous function
• defer: To schedule a function call to be executed right after a function
returns.
Type System and more
• Receiver type for method declarations
• Main() and Init()
• Standard library
• Built in Testing, Benchmarking, Packing, Tooling
Presence
• Google
• Uber
• SoundCloud
• Walmart
• Docker
• Bitly
• BBC
• Basecamp
• DigitalOcean
• StackExchange
• Mozilla
• Lyft
• Blockchain
startups
• Facebook
• Twitter
• YouTube
• Apple
• Dropbox
• Github
• Games like Farmville
• IBM
• CoreOS
• GitLab
• InfluxData
• Intel
• Medium
Go: What's Different ?
References:
• https://en.wikipedia.org/wiki/Go_(programming_language)
• https://talks.golang.org
• https://hackernoon.com/why-go-ef8850dc5f3c
• Go in Action by Bill Kennedy
• https://medium.com/exploring-code/why-should-you-learn-go-
f607681fad65
• https://hackernoon.com/golang-or-the-future-of-the-dev-
984c2f145bbe
• https://gist.github.com/ungerik/3731476
THANK YOU

More Related Content

PPTX
Ruby and Security
PPTX
Ruby, the language of devops
PDF
Making CLI app in ruby
PDF
Ruby in office time reboot
PDF
Jslab rssh: JS as language platform
PPTX
Rubykaigi 2017-nishimotz-v6
PDF
Join the dart side of webdevelopment reloaded
PDF
JRuby: Pushing the Java Platform Further
Ruby and Security
Ruby, the language of devops
Making CLI app in ruby
Ruby in office time reboot
Jslab rssh: JS as language platform
Rubykaigi 2017-nishimotz-v6
Join the dart side of webdevelopment reloaded
JRuby: Pushing the Java Platform Further

What's hot (20)

PDF
iOS UI debugging
PDF
Scala.io
PDF
Bringing Concurrency to Ruby - RubyConf India 2014
PDF
Cookpad Hackarade #04: Create Your Own Interpreter
PDF
Ci. Drupal Camp Berlin 2014
PDF
Enjoy Ruby Programming in IDE and TypeProf
KEY
TSSJS 2011 - JRuby
PDF
AppDays Pordenone 2014: Web App Engineering With Dart
PDF
An introduction to go programming language
PPTX
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
PDF
Isomorphic Kotlin
PDF
Our wish to Flowtype
PDF
Introduction to protocol buffer
PPTX
From .NET Core 3, all the rest will be legacy
PPTX
The Future of Node - @rvagg - NodeConf Christchurch 2015
PDF
A Type-level Ruby Interpreter for Testing and Understanding
PDF
Introduction to Kotlin coroutines
PDF
A Quick Tour of JVM Languages
PDF
How to create/improve OSS products and its community
iOS UI debugging
Scala.io
Bringing Concurrency to Ruby - RubyConf India 2014
Cookpad Hackarade #04: Create Your Own Interpreter
Ci. Drupal Camp Berlin 2014
Enjoy Ruby Programming in IDE and TypeProf
TSSJS 2011 - JRuby
AppDays Pordenone 2014: Web App Engineering With Dart
An introduction to go programming language
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Isomorphic Kotlin
Our wish to Flowtype
Introduction to protocol buffer
From .NET Core 3, all the rest will be legacy
The Future of Node - @rvagg - NodeConf Christchurch 2015
A Type-level Ruby Interpreter for Testing and Understanding
Introduction to Kotlin coroutines
A Quick Tour of JVM Languages
How to create/improve OSS products and its community
Ad

Similar to Go: What's Different ? (20)

PDF
Introduction to Go
KEY
Why ruby and rails
PPTX
T4T Training day - NodeJS
PDF
Open Source SQL Databases
PDF
Go - A Key Language in Enterprise Application Development?
PDF
Starting from scratch in 2017
PDF
High-Performance Computing with C++
PDF
Clojurescript slides
PDF
GoLang - Why It Matters
PDF
High Performance Systems in Go - GopherCon 2014
PDF
Monorepo at Pinterest
PDF
Clojure in real life 17.10.2014
PPTX
Kotlin Multiplatfom In Action
KEY
SSJS, NoSQL, GAE and AppengineJS
PDF
Kotlin Multiplatfom In Action
KEY
PPTX
Node Architecture.pptx
PDF
cadec-2017-golang
PPTX
A deep dive into python and it's position in the programming landscape.pptx
PDF
GWT Jug Stuttgart
Introduction to Go
Why ruby and rails
T4T Training day - NodeJS
Open Source SQL Databases
Go - A Key Language in Enterprise Application Development?
Starting from scratch in 2017
High-Performance Computing with C++
Clojurescript slides
GoLang - Why It Matters
High Performance Systems in Go - GopherCon 2014
Monorepo at Pinterest
Clojure in real life 17.10.2014
Kotlin Multiplatfom In Action
SSJS, NoSQL, GAE and AppengineJS
Kotlin Multiplatfom In Action
Node Architecture.pptx
cadec-2017-golang
A deep dive into python and it's position in the programming landscape.pptx
GWT Jug Stuttgart
Ad

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25 Week I
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Go: What's Different ?

  • 1. GO: What’s Different ? Tarun Vashisth 28th Sep 2018
  • 2. Contents • Programming Languages • History • Challenges • Concurrency • Object Oriented Design • Type system and more • Presence • References
  • 4. History • 1950’s: Fortran, Lisp, Algol, Cobol • 1960-70’s: B, Pascal, C, Prolog, SQL • 1980’s: C++, Ada, Matlab, Erlang, Perl • 1990’s(Internet age): Haskell, Python, VB, R, Ruby, Java, PHP, JavaScript • 2000’s: ActionScript, C#, D, Groovy, Scala, Clojure, Go, Rust, Kotlin, Swift • CULTURE ?
  • 5. Challenges: Hardware limitations • A fundamental turn towards concurrency in software • Well, 3GHz CPUs -> 2004 and today -> MacBookPro@2.7GHz.
  • 6. Challenges: Hardware limitations • Resort to multicore • Cannot scale indefinitely • Comes with synchronization overhead between the operations. • Increase transistor per unit area on chip?
  • 7. Challenges: Multithreaded design • Traditional programming languages -> 90’s -> traditional single- threaded processes. • Multi-threading • Messy, complicated and expensive. • Significant setup and teardown costs. • We cool ?
  • 8. Challenges: Multithreaded design • Real problem: • Concurrent execution • Threading-locking • Race conditions • Deadlocks. • Go: Designed keeping in mind multiple cores • Famous paper “Communicating Sequential Processes” by C.A.R. Hoare
  • 9. Node.js: I don’t block • Relatively easy to write and run • Awesome V8 engine • Event loop with promises • NodeJS is single-threaded. • It cannot directly use multi-core CPUs even though it is possible to spawn different processes on several threads.
  • 11. Go • 2009 at Google by Rob Pike, Ken Thompson, Robert Griesemer. • Primary motivation: Shared dislike of C++ • Slow compile times • Standard Library offers no real support for Unicode • Code bloat etc.. • Go is targeted as a modern C and especially as a replacement for C++.
  • 12. Go • Rethinks the traditional object-oriented development • Effectively use all of the cores on your expensive server • Go has a concise syntax with few keywords to memorize • Fast complier: compiles to machine code • Built in concurrency. NO to special threading libraries
  • 14. Go • Simple and effective type system • Garbage collector: don’t have to manage your own memory. • Spend less time waiting for your project to build • Looks at the library that you directly include, rather than traversing the dependencies of all the libraries that are included in the entire dependency chain like Java, C, and C++. • Taste: Objected Oriented and Functional Programming
  • 16. Concurrency • Concurrency vs Parallelism ? • Concurrency: Programming as the composition of independently executing processes. • Parallelism: Programming as the simultaneous execution of (possibly related) computations. • Concurrency is about dealing with lots of things at once. • Parallelism is about doing lots of things at once. • Concurrency is about structure, parallelism is about execution.
  • 18. Go supports concurrency • Go provides: • concurrent execution (goroutines) • synchronization and messaging (channels) • multi-way concurrent control (select) • Goroutines come with built-in primitives to communicate safely between themselves (channels). • A single goroutine can run on multiple threads. Goroutines are multiplexed into small number of OS threads. • Goroutine is very cheap: 2kb vs 1MB(Java)
  • 19. Objected Oriented Design • No Inheritance ! No multi Inheritance problem. • Go developers simply embed types to reuse functionality in a design pattern called composition • Interface: Allows you to model behavior
  • 20. Type System and more • Short variable declaration operator (:=) • type interface{} • Structs • Anonymous function • defer: To schedule a function call to be executed right after a function returns.
  • 21. Type System and more • Receiver type for method declarations • Main() and Init() • Standard library • Built in Testing, Benchmarking, Packing, Tooling
  • 22. Presence • Google • Uber • SoundCloud • Walmart • Docker • Bitly • BBC • Basecamp • DigitalOcean • StackExchange • Mozilla • Lyft • Blockchain startups • Facebook • Twitter • YouTube • Apple • Dropbox • Github • Games like Farmville • IBM • CoreOS • GitLab • InfluxData • Intel • Medium
  • 24. References: • https://en.wikipedia.org/wiki/Go_(programming_language) • https://talks.golang.org • https://hackernoon.com/why-go-ef8850dc5f3c • Go in Action by Bill Kennedy • https://medium.com/exploring-code/why-should-you-learn-go- f607681fad65 • https://hackernoon.com/golang-or-the-future-of-the-dev- 984c2f145bbe • https://gist.github.com/ungerik/3731476