Intro
Go language is a programming language initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a statically-typed language having syntax similar to that of C.
Go is a general-purpose language designed with systems programming in mind.
Programs are constructed using packages, for efficient management of dependencies. Go programming implementations use a traditional compile and link model to generate executable binaries.
Go is fast! Go is extremely fast. The performance is similar to that of Java or C++. For our use case, Go is typically 40 times faster than Python.
Features
- Concurrent Language
- Execute concurrently
- Communicate between executing things concurrently
- Goroutines are much cheaper than threads
- Garbage collected
- Strong and statically typed
- Fast compile time
- Compile to standalone binaries
- Builds fast at scale
- Goroutines
- Channels
- Channel are typed values that allow goroutines to synchronize and exchange information.
- Select - The select statement is like a switch, but the decision is based on ability to communicate rather than equal values
- Support for Interfaces and Type embedding
- Production of statically linked native binaries without external dependencies
Features excluded intentionally
- Support for type inheritance
- Support for method or operator overloading
- Support for circular dependencies among packages
- Support for pointer arithmetic
- Support for assertions
- Support for generic programming
Installing
brew install go
References
- https://www.tutorialspoint.com/go
- https://learnxinyminutes.com/docs/go
- https://golang.org/doc/code.html
- https://productcoalition.com/reasons-why-golang-is-better-than-other-programming-languages-4714082bb1b1
- https://www.toptal.com/go/golang-oop-tutorial
- https://youtu.be/MKkokYpGyTU
- Introduction to Go Programming for beginners
- https://www.freecodecamp.org/news/learn-go-by-building-11-projects
- Writing our own Concurrent Thread safe Queue - YouTube
- Go Programming Tutorial - 3 Beginner Projects - YouTube