News for hackers. Stuff that matters.
Re:Never patterns, exhaustive matching, and uninhabited type... by saagarjha on Saturday August 18, 2018 @10:50PM (#17792280)
This isn't an assert, it's not a runtime check; it's done at compile time. You need to prove to the compiler that your code can never reach this point; common ways of doing so are by calling exit or inserting an unconditional infinite loop. If your underlying computational platform is broken, this isn't going to save you, but I don't think there's much you can do at that point.
Re:Never patterns, exhaustive matching, and uninhabited type... by Rusky on Sunday August 19, 2018 @02:45PM (#17795601)
Yes, I know- that was my point. The comment I replied to was talking about CPU/RAM errors somehow bypassing that proof.