
Tony Hoare's CSP Paper Implemented in Go - geetarista
http://godoc.org/github.com/thomas11/csp
======
JulianMorrison
Why not close the channel instead of sending 0? You can detect a closed
channel with the "x, ok := <-y" form.

~~~
thomas11
Author here. Originally I thought it's bad form to close a channel that the
client passes in. But you're the second one to point this out and I've come
around to seeing it's clearer and more idiomatic. Just pushed the change.

------
jgrahamc
I emailed these to him. I'll let HN know if he has an interesting reply.

------
mseepgood
Now I will finally read the paper.

~~~
octo_t
I really hope this is sarcastic, because CSP is the basis of almost all
concurrency (and certainly pretty much every formal model of concurrency).

If it needs some implementation in your language _du jour_ before you consider
reading it, it seems lacking to me.

~~~
mseepgood
No, I always wanted to read the paper, because I know that it's a very
influential paper. I actually started reading it once, but I got stuck. Now I
read this Go code and immediately understood all of it. So I hope it will help
me understand the paper.

~~~
burke
Agree. I slogged my way through it a while ago, and I wish I had this Go
translation at that time to help me along. It is much clearer to me than the
notation used in the paper.

