3 ms·
I always felt like go channels were more of a clever solution than a good one. Goroutines are a pleasure to work with though.
by irjoe 9mo ago
I always felt like go channels were more of a clever solution than a good one. Goroutines are a pleasure to work with though.
- all2 9mo agoI'm curious what the alternative would be? Python's threads/sub-processing almost requires IO queues to function well, and are nearly the same semantically as channels... I'm not saying these are "good", just wondering what alternatives look like?
- hackingonempty 9mo agoOne alternative is STM, software transactional memory which is modular and composable. I think Haskell was first to implement it but its also in Clojure and some Scala libs. This is what ZIO's type safe version looks like https://zio.dev/reference/stm/ https://zio.dev/reference/stm/ Scala's for-comprehension is syntactic sugar for calls to flatMap, map, and withFilter, similar to Haskell's do-notation.