Why do (or don't) languages forbid unreachable code?

Why do (or don’t) languages forbid unreachable code?.
In Java, the following is a compile-time error, due to the unreachable statement:
while(true) {
break;
System.out.println("unreachable");
}

In Rust, the equivalent code is not:
l…

Read in full here:

This thread was posted by one of our members via one of our news source trackers.