Hoare's CSP pretty much takes this approach, and for my money, I think that sort of approach makes the common case of parallel programming easier.
Hoare's CSP pretty much takes this approach, and for my money, I think that sort of approach makes the common case of parallel programming easier.
I think this is going to turn out to be a killer feature of Ocaml once people get used to the fact that using 8 cores at once isn't that great of a goal when on-demand computing platforms let you scale much much larger. Pretty soon no one will be all that concerned about how much happens on any one machine. It will be how much gets done per process, and how much gets done per 'cloud'. AppEngine already does this.
And it already is a design feature. The GC is not single threaded b/c they're too dumb to figure out how to fix it (not that you were saying that, but people tend to jump to that conclusion). It's because they want the fastest possible single threaded performance, which means not polluting the GC with the kinds of locking mechanisms necessary to support multi-threaded operation.
I think this point isn't made often enough. There certainly are times when scaling within a single machine is useful but, as is more often the case, if you have to scale beyond a single physical instance you might as well plan for process-oriented parallelism up front.
And the ease of use of multi-process architectures needs to be improved as well.
For the other 20% of the time... threads are awesome. :)
http://projects.camlcity.org/projects/ocamlnet.html
http://rwmj.wordpress.com/2012/02/24/whenjobs-job-lists-canc...