Re:Why Python Is Not My Favorite Language (2016)
by Turing_Machine on Tuesday June 20, 2017 @10:53PM
(#14600314)
Yeah, I have. Java is notorious for tossing 30 page runtime exceptions all over the place. Given that the alleged advantage of getting type happy is to prevent runtime errors, can you explain how Java actually supports your case?
[ Parent
| on HN ]
Re:Why Python Is Not My Favorite Language (2016)
by KirinDave on Tuesday June 20, 2017 @11:17PM
(#14600394)
Are you mad at the existence of stack traces? Would you prefer it if the errors were unsourced? Are we pretending Python does it better or even that differently?
As for "the case", Java does reduce the # of NPEs you get by not letting you deref invalid keys on objects, and it makes it easier to handle objects in the abstract.
Re:Why Python Is Not My Favorite Language (2016)
by emodendroket on Wednesday June 21, 2017 @09:18AM
(#14603465)
Well, for one, the post I was responding to claimed that no language touting type safety had ever caught on, and yet there is Java, likely the most used programming language on Earth next to C and C++ (which themselves offer some level of type safety).
But moving on to your claim in this post, nobody ever said "compile-time checks eliminate errors altogether." What they do do is reduce errors and completely eliminate certain classes of errors. They also make maintenance and debugging much easier because they define clear expectations for the interfaces of their arguments and return values. The length of stack traces is a completely orthogonal concern.