Re:A Rust match made in hell
by jeffrallen on Saturday April 30, 2022 @05:22PM
(#31219496)
Channels are easy to reason about. If the language that gives me channels asks me to let it manage memory too, then cool, fine with me.
[ Parent
| on HN ]
Channels are most definitely not easy to reason about in the slightest. Superficially, they might appear to be on the surface: but they're really not and have innumerable subtle cases and behaviours in the face of various kinds external conditions, scheduling behaviours, etc. They only start to become 'easy' in a language that utterly ignores all other paradigms, interoperability, and performance concerns as in Go.
They're easy to implement; terribly difficult to reason about from a correctness point of view, which is really all that matters in performant multithreaded code.
Given that it can take weeks to debug a deadlock, I am more than happy to pay the price of some boilerplate and difficult types if that helps correctness.