Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This misses the point of the article. It's short-sighted to say that he's reinvented CSP given that the entire concurrency model in Go is based around CSP, and the author is already aware of it. The article is more related to RAII, scope, lifetimes, etc. than any model of concurrency.


Channels are lifted from CSP, but PAR is obviously missing.


par is "select" effectively. While that isn't 100% the case, it is true.


Huh? I thought "select" was "ALT"??


'go' is PAR with different syntax (Everything after the 'go' line is implicitly one branch of the PAR)

'select' is ALT


Hmmm...as far as I understood the FA, the point is exactly that 'go' is unlike PAR in important respects.

'go' is more like a goto, the new goroutine is spawned, without any scoping. PAR opens a scope where all the contained routines are executed in parallel, but all of these must have terminated before the statement after the PAR is executed.

?


> Everything after the 'go' line is implicitly one branch of the PAR

No, it isn't, because Go doesn't do the italicized part:

"Everything in a PAR block will run in parallel and all their outputs will be collected and fed as the input to the next SEQ."


That's correct apologies.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: