Our great sponsors
-
concurrency-examples-kt
Provide both Kotlinx coroutine and Reactor version for examples of this article: https://mccue.dev/pages/5-2-22-go-concurrency-in-java
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Good read. The differences aren't as stark as I would have imagined, but of course, the Go approach is by and large cleaner and easier to read no doubt. The Kotlin examples somebody posted in the comments (https://github.com/alexismanin/concurrency-examples-kt) are much better IMO, but Go is still the cleanest. Go's concurrency really is a killer feature.
Golang is very flexible to allow you create the src folder, however, the community have created some patterns to help you organize golang code. The most famous one is the Standard Go Project Layout: https://github.com/golang-standards/project-layout
Quasar Fiber (https://docs.paralleluniverse.co/quasar/) is the equivalent implementation of goroutine in Java.