HN2new | past | comments | ask | show | jobs | submitlogin

From casually looking at both CPython and JVM code I conclude that implementation of exception handling in Java and Python is almost same. So this is more a cultural difference than effectiveness issue.


In Java you can do stuff like, the JVM is going to bounds check you anyway, so why bother checking yourself if you're about to go off the end of an array? Just i++ and catch IndexException (or whatever it's called).


You can do that, but nobody writes Java code like this since it's more awkward and aesthetically offensive than explicit bounds checking.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: