4 ms·
"X isn't possible because of Turing completeness" is almost always wrong. GC is another "impossible" task, yet those are everywhere. The real goal is to find a
by Veedrac 11y ago
"X isn't possible because of Turing completeness" is almost always wrong. GC is another "impossible" task, yet those are everywhere.
The real goal is to find a strategy that works well enough, often enough. Dynamic GC gives up perfect collection (aiming to be merely good enough). Rust's data race guarantees prevent safely expressing some subset of correct programs.
Whether deadlock prevention can be done nicely enough for general case usage is an open question.
- kibwen 11y agoGC works great in practice, but as you say it isn't provable. Likewise, Rust goes a long way towards preventing deadlocks in practice, but that also isn't provable. All I'm talking about here are guarantees. Rust's type system guarantees that there are no data races; that's firm bedrock that I can rely upon. I can't rely on there being no deadlocks just as I can't rely on a garbage collector actually returning any memory. That doesn't mean these tools aren't useful in practice, only that I have to take their failure modes into consideration if I want to write correct programs.