4 ms·
This is interesting, but I am curious why the effort has gone into this C++ tool when Google's own multi-threading-first language, Go, is based on Tony Hoare's
by hellofunk 10y ago
This is interesting, but I am curious why the effort has gone into this C++ tool when Google's own multi-threading-first language, Go, is based on Tony Hoare's work from decades ago, except that it omits the most interesting feature of CSP, the specialized calculus theorem that can prove the correctness of all your multihreaded logic. It would seem that those interesting ideas were ignored in favor of providing tooling for C++.
- flamedoge 10y agoBecause people can write multi-threaded code in C++.
- stymaar 10y agoFor the record, Go has no static thread safety guaranty. It's easy to write a data-race in Go (and it occurs frequently). Fortunately the go compiler has a tool that help detecting data-races[1]. The only two languages I know that offer data-race-free multi-threading are Pony[2] and Rust. Additionally, Go isn't really a C++ competitor: you'll probably never see Google Chrome using Go instead of C++. Go is a good language for back-end micro-services and cli tools, not for building performance-sensitive native desktop applications. [1]: https://golang.org/doc/articles/race_detector.html https://golang.org/doc/articles/race_detector.html [2]: http://www.ponylang.org/ http://www.ponylang.org/
- hellofunk 10y agoCorrect, the point of my post is that Go does not have these guarantees even though it is one of the few (only?) languages based on a methodology that actually has a proven theorem for statically guaranteeing thread safety; yes, that was never implemented in Go despite that all the other aspects of the methodology were. Which I just find interesting.
- masklinn 10y ago> The only two languages I know that offer data-race-free multi-threading are Pony[2] and Rust. I believe Erlang also does for the most part, though some of its built-in constructs are racey (the process registry if you query it, shared ETS tables, and dirty Mnesia operations).
- stymaar 10y ago> The only two languages I know that offer data-race-free multi-threading are Pony[2] and Rust. I should have added «with shared memory», otherwise any language that purely rely on message-passing is also free from data-races (even JavaScript is), but it lacks this important feature.