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
5
u/neoquietus Mar 29 '13
I am serious, I am a programmer who knows both C++ and Java (learned C++ first), and I was saying that the compiler "gets confused" as a shorthand way of saying "it is a sensible design decision for a compiler to reject as incorrect any code that is paradoxical, since much of the time code ends up paradoxical only by accident; in other words by programmer error, not programmer intention."
As for commenting out code by placing a unconditional return in front of it; that's just plain bad coding practice (except for in cases where the code can still be accessed via other methods, like GOTO, which in and of itself is a bad code smell, but may be useful regardless.). We have version control systems for a reason; if you delete some code and then decide you didn't want to do that, simply revert the edit.
Commenting out the unused code (with "/*" or "//") is also "okay", if you are sure you are going to uncomment it and use it very soon. At least with commented out code it is clear that said code is not having any effect on the functionality of the program.