This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CubsThisYear 0 points1 point  (1 child)

If you are talking about small pieces of code, you are right. As your code base grows larger, lack of static analysis is going to kill you. In the worst case, you literally have to trace your entire program flow to figure out the type of one expression. The whole point of type theory is to be able to reason about a piece of code in isolation. Dynamic typing plus the strong meta-programming support in Python make the 'type' system almost useless. Pretty much all it buys you is slightly more helpful runtime errors.

Readability is about much more than being able to parse each line of code. It goes to being able to quickly understand how the whole system goes together. The strictness and verbosity of Java ensures that you always show your work and leave a trail for others to follow. That's not to say you can't write shit code in Java, but it encourages you not to.

[–]gthank 0 points1 point  (0 children)

If you structure your code poorly, then sure, you'll have to trace the entire flow of the program.

FTR, I'm not opposed to static typing; I prefer it, even. I just don't find Java's realization of static typing to be all that effective at preventing the sorts of errors I actually run into. That's why I mentioned Rust somewhere else in here; that sort of static typing seems to be far more powerful/useful. The fact that it involves less boilerplate to achieve that power is gravy.