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
Ad

More Related Content

What's hot (20)

iOS UI debugging
iOS UI debuggingiOS UI debugging
iOS UI debugging
davidolesch
 
Scala.io
Scala.ioScala.io
Scala.io
Diego Pacheco
 
IDLs
IDLsIDLs
IDLs
Ruslan Shevchenko
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014
Charles Nutter
 
Cookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own InterpreterCookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own Interpreter
mametter
 
Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014
Yuriy Gerasimov
 
Enjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProfEnjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProf
mametter
 
TSSJS 2011 - JRuby
TSSJS 2011 - JRubyTSSJS 2011 - JRuby
TSSJS 2011 - JRuby
Charles Nutter
 
AppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With DartAppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With Dart
Claudio d'Angelis
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
Technology Parser
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Sunny Sharma
 
Isomorphic Kotlin
Isomorphic KotlinIsomorphic Kotlin
Isomorphic Kotlin
Benjamin Snider
 
Our wish to Flowtype
Our wish to FlowtypeOur wish to Flowtype
Our wish to Flowtype
Teppei Sato
 
Introduction to protocol buffer
Introduction to protocol bufferIntroduction to protocol buffer
Introduction to protocol buffer
Tim (文昌)
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacy
Rick van den Bosch
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015
rvagg
 
A Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and UnderstandingA Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and Understanding
mametter
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutines
Roman Elizarov
 
A Quick Tour of JVM Languages
A Quick Tour of JVM LanguagesA Quick Tour of JVM Languages
A Quick Tour of JVM Languages
Stefane Fermigier
 
How to create/improve OSS products and its community
How to create/improve OSS products and its communityHow to create/improve OSS products and its community
How to create/improve OSS products and its community
SATOSHI TAGOMORI
 
iOS UI debugging
iOS UI debuggingiOS UI debugging
iOS UI debugging
davidolesch
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014
Charles Nutter
 
Cookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own InterpreterCookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own Interpreter
mametter
 
Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014Ci. Drupal Camp Berlin 2014
Ci. Drupal Camp Berlin 2014
Yuriy Gerasimov
 
Enjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProfEnjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProf
mametter
 
AppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With DartAppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With Dart
Claudio d'Angelis
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
Technology Parser
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Sunny Sharma
 
Our wish to Flowtype
Our wish to FlowtypeOur wish to Flowtype
Our wish to Flowtype
Teppei Sato
 
Introduction to protocol buffer
Introduction to protocol bufferIntroduction to protocol buffer
Introduction to protocol buffer
Tim (文昌)
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacy
Rick van den Bosch
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015
rvagg
 
A Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and UnderstandingA Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and Understanding
mametter
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutines
Roman Elizarov
 
A Quick Tour of JVM Languages
A Quick Tour of JVM LanguagesA Quick Tour of JVM Languages
A Quick Tour of JVM Languages
Stefane Fermigier
 
How to create/improve OSS products and its community
How to create/improve OSS products and its communityHow to create/improve OSS products and its community
How to create/improve OSS products and its community
SATOSHI TAGOMORI
 

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

Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
zhubert
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
Reuven Lerner
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 
Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL Databases
Emanuel Calvo
 
Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?
C4Media
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
Stefano Bonetta
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++
JetBrains
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
elliando dias
 
GoLang - Why It Matters
GoLang -  Why It MattersGoLang -  Why It Matters
GoLang - Why It Matters
rahul
 
High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014
Derek Collison
 
Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
Suman Karumuri
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
Metosin Oy
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
Marko Mitic
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
Eugene Lazutkin
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
Marko Mitic
 
Pulsar
PulsarPulsar
Pulsar
Eugene Lazutkin
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptx
Ahmed Hassan
 
cadec-2017-golang
cadec-2017-golangcadec-2017-golang
cadec-2017-golang
TiNguyn863920
 
A deep dive into python and it's position in the programming landscape.pptx
A deep dive into python and it's position in the programming landscape.pptxA deep dive into python and it's position in the programming landscape.pptx
A deep dive into python and it's position in the programming landscape.pptx
Murugan Murugan
 
GWT Jug Stuttgart
GWT Jug StuttgartGWT Jug Stuttgart
GWT Jug Stuttgart
hbraun
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
zhubert
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 
Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL Databases
Emanuel Calvo
 
Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?
C4Media
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
Stefano Bonetta
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++
JetBrains
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
elliando dias
 
GoLang - Why It Matters
GoLang -  Why It MattersGoLang -  Why It Matters
GoLang - Why It Matters
rahul
 
High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014
Derek Collison
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
Metosin Oy
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
Marko Mitic
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
Eugene Lazutkin
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
Marko Mitic
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptx
Ahmed Hassan
 
A deep dive into python and it's position in the programming landscape.pptx
A deep dive into python and it's position in the programming landscape.pptxA deep dive into python and it's position in the programming landscape.pptx
A deep dive into python and it's position in the programming landscape.pptx
Murugan Murugan
 
GWT Jug Stuttgart
GWT Jug StuttgartGWT Jug Stuttgart
GWT Jug Stuttgart
hbraun
 
Ad

Recently uploaded (20)

#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Ad

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 -> [email protected].
  • 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