3 ms·
> [..] there are no new concepts in Go [..] Except for native support for CSP and that programs should be written in a CSP style. Learning Go and skipping CSP
by eikenberry 4y ago
> [..] there are no new concepts in Go [..]
Except for native support for CSP and that programs should be written in a CSP style. Learning Go and skipping CSP is not learning Go.
- morelisp 4y ago> Learning Go and skipping CSP is not learning Go. Learning Go seems to be inevitably "learning CSP", using way too much "CSP", then eventually coming to your senses and going back to atomic types and locks for probably 70% of cases.
- eikenberry 4y agoThinking CSP is something you can replace with atomic types and locks is a common misconception. Goroutines and channels are the primitives used by CSP, but just using them is not CSP. CSP is a whole program design system that can use all the concurrency primitives. There is no conflict between the using CSP and locks/atomic types. They work well together as they have different uses. The misconception is pretty widespread and cancerous to the community. Ignoring CSP is ignoring Go's best feature for writing better code. It takes some time to learn to do well (I'm still working on it) as it is a different paradigm than most people are used to, but it is well worth the effort IMO.