Conversation

What "compiling Rust is NP-hard" (niedzejkob.p4.team/rust-np/) really shows is that pattern exhaustiveness checking is NP-hard. To me, this is a good example of "sometimes really useful features are NP-hard, and it's worth accepting this theoretical worst-case complexity".
8
281
I found the discussion there a bit frustrating, since the complexity result was well-known when Maranget published his paper on this problem 15 years ago, and he cites a paper from 15 years before that.
2
25
The Rust team usually knows the relevant literature, but a lot of online discussion of Rust makes it seem like sum types and pattern matching were invented in 2014.
1
28