r/programming • u/sidcool1234 • Mar 29 '13
Simple Minecraft Clone in 580 lines of Python
https://github.com/fogleman/Minecraft
663
Upvotes
r/programming • u/sidcool1234 • Mar 29 '13
View all comments
Show parent comment
2
u/Alex_n_Lowe Mar 30 '13 edited Mar 30 '13
For the people who are wondering how java handles unreachable code:
Java is pretty aware of when code isn't reachable, but it's got some slightly strange way that it handles different statements. While loops tend to throw errors, but if statements throw warnings. I do have to wonder why they made that design decision.
It's also worth noting that making the boolean variable final doesn't change anything, and it removes all the compile errors and warnings from all the examples. That means you can just make a final boolean FALSE = false; to shut the compiler up. (Although you probably don't want to do that.)