Comments on Replacing C

Achim Gratz Stromeko at nexgo.de
Mon Jan 9 20:25:05 UTC 2017


Eric S. Raymond writes:
> Ever since reading about occam in the 1980s I'd had a suspicion that CSP
> was the Right Thing - a suspicion which seems to me to have been strongly
> confirmed by my recent experience using Go channels.

Well, having programmed on a Transputer machine farther back in time
than I like to remember, this Occam thing really wasn't a panacea.  Or
at least it wasn't for the type of numerical simulations I was trying to
parallelize.  The Occam channels were partly implemented in hardware on
the Transputer, and those facilities did have an API into FORTRAN and C
as well.  That (aside from the usual bugs in libraries that were quite
fresh) was usable to build the sort of primitives that I wanted (Thomson
barriers, mostly).

> Posix threads felt like fumbling for razor blades in the dark.  Go
> channels are a concurrency toolkit that is expressive, simple, and (no
> shit) *beautiful*.  Decent primitives really matter.  I think I'm going
> to miss these a whole lot if we go with Rust.

Well, I remember POSIX threads more fondly as the first time you could
take a large parallel program from one machine to the other and actually
expect it to work just by re-compiling.  Yes, you had to build your
locking primitives yourself for anything serious.  Shades of the X
Window System, "mechanism, not policy".  I'd still recommend Dave
Butenhof's "POSIX Threads" book.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds



More information about the devel mailing list