4 ms·
Occam may not have become mainstream, but it showed Hoare's CSP channels in a programming language. Now days we see channels in Go, whose "select" is similar to
by chrisaycock 7y ago
Occam may not have become mainstream, but it showed Hoare's CSP channels in a programming language. Now days we see channels in Go, whose "select" is similar to Occam's "ALT".
Fun fact: In contrast to process algebras like CSP, there is the Actor model. Instead of using an intermediary channel, the Actor model sends messages directly to a recipient process. These two message-based models of concurrency have influenced each other for decades.
- tombert 7y agoThere's also Clojure's core.async, which actually calls it "alts", more-similar to Occam.
- atrn 7y agoI really wish Go's select had guard clauses. The need to nil channels feels like a hack. However I haven't actually had much need for them but haven't written many things that would need them. I do miss PAR's synchronization semantics, which Go programmers know as the "sync.WaitGroup" idiom. Given the number of times I see Go developers asking about synchronizing goroutine termination perhaps having some form of concurrent control structure atop 'go' could help. Or maybe not - they'd just start asking about their inability to terminate :) At least PAR is easy enough to simulate (I wrote myself a little 'par' package to hide the WaitGroup manipulations with functions/closures as the [CSP] process bodies).