Tim McNamara @timclicks.dev ยท Nov 4

To understand what that that means, take a look at this code: if 1 > -7 { println!("๐ŸŽ"); } else { println!("๐Ÿ"); } The compiler can deduce that one is greater negative seven, so it doesn't need to compile the "else" side. The whole conditional can be eliminated.

2 likes 1 replies

?

Replies

Tim McNamara ยท Nov 4

For a compiler, invalid states are just as impossible. And it's continually hunting for code paths to eliminate. โœจ So, whenever you create a program that can trigger an invalid state, your compiler produces broken code. โœจ