- Still sticking with C (liking function pointer arrays) in micro-controllers.
My favorite PC language is Go
- Go is open source, sponsored, professionally developed and used by Google.
- Go is a multi-purpose language.
- It supports graphics not directly but GUI frameworks are around.
- Go is object oriented.
- Go uses composition instead of inheritance - programs get cleaner this way.
- In Go interfaces are implicit - they need no explicit declaration.
- This allows clean and simple APIs in your code without unneeded dependencies.
- Go is easy to learn, to use and gives quick programming success.
- Go is a compiled language, therefore checks a lot before building the code.
- You get most errors at compile-time and not at run-time as with scripting languages (like Python). The Go compiler itself is fast. It allows script like usage of Go as well.
- The Go program execution is fast.
- Could be about half speed of a well written C program - not relevant for normal use cases. To get an equivalent "well written C programm" takes much longer than getting the Go program for a specific task.
- Go is a managed language making memory leaks impossible.
- No explicit memory allocation and free.
- Go supports slices, a very light array management struct.
- Go has pointers but no pointer arithmetic, making code more reliable this way.
- Go is designed to use multi-core machines and single-core ones and allows easy multi-threading and inter-process communication.
- Concurrent programming using Go rotines and channels allow efficient program structures.
- Parallel execution allows to use the full multicore power of modern systems easyly.
- Concurrency is not Parallelism by Rob Pike
- The auto-formatting as languge part is very comfortable.
- This allows a bunch of helper tools.
- A testing environment comes with the language. Fuzzying is supported.
- Simply create
my_test.go
files inside your Go package and rungo test ./...
in the project root.
- Simply create
- You get a stand-alone runnable without libraries dependencies.
- No missing library anymore.
- No install ... before running an executable.
- Many platforms are supprted, also mobile development.
- Go has an integrated documentation System.
- Just add comments to your functions.
- Easy Visibility control: Packages export UppercaseFunction and hide lowerCaseFunction.
- Go can use C/C++-code and vice versa, but crossing the border takes time, so avoid that in loops.
- Compatibility: Legacy Go code runs on new Go versions.
- Go has generics now.
- Not made for small microcontrollers.
- BUT: There is TinyGo.
- Not well suited for fast hard real-time applications on sub-millisecond level because of the stop-the-world garbage collector.
- BUT: The GC gets better and better with new Go versions AND avoiding that Go uses the heap heavily, avoids GC at all.
- Should you learn Go in 2023?
- Google I/O 2010 - Go Programming
- Understanding the Go Compiler - Jesús Espino
- Learn GO Fast: Full Tutoria (Go in 1 hour)
- Learn Go Programming - Golang Tutorial for Beginners (Golang in 7 hours)
- 7 common mistakes in Go and when to avoid them by Steve Francia (Docker)
- Gorilla Toolkit for Golang is revived! But is it too late?
- Build a REST API from scratch with Go, Docker & Postgres | Go Tutorial
- The Go Language: What Makes it Different?
- Top 3 Programming Languages for 2019
- Reasons Why Golang is Better Than Other Programming Languages
- Watch "5 Reasons Why Golang is The Best Programming Language to Learn in 2021 (including golang drawbacks)" on YouTube
- A curated list of awesome Go frameworks, libraries and software
- Golang For Mobile Development
- GitHub Go
- The Go playground
- Concurrency in Go
- Managing dependencies
- Why are interfaces needed in Golang?
- Implementing Golang Interfaces
- Testing Techniques
- Arrays, slices (and strings)
- Golang: File Tree Traversal (filepath.Walk)
- Simple golang expirement with ANSI colors · GitHub
- Binary Search Algorithm Implemented in Go
- A Go unikernel running on x86 bare metal
- The Trice tool is written in Go.
- Test tools stimulating embedded devices under test.