Hacker News new | past | comments | ask | show | jobs | submit login

I learned Java long time ago and have worked on a number of large projects. I agree that it is easier to maintain code in Java. The downside, as the author described, is the verbosity of the language.

Python is a wonderful language and exemplifies the "essence" of programming in that it nearly looks like pseudocode on a whiteboard. The syntactic overhead is minimal. I liken it to solving an algebra problem with pencil and paper - you would never write "int x = 5" on paper, just "x = 5."

It's this simplification that makes Python a joy to use...but also difficult to maintain. Programmers have to get in the habit of following code style guidelines, rather than being (somewhat) coerced into them by strong typing.

A simple example of this is the question: Where does a Python program start? If I provide a Python script, the reader would have to scan from top to bottom to see the first non-definitional line of code. With Java, there is no ambiguity; it is the main function. A company may declare a style guidline that requires Python programs define a main-check function such as:

if __name__ == "__main__": main()

but the developer needs to learn this policy.




I don’t think the verbosity of modern Java is any worse than any other mainstream lang out there. The only one I can think of is that 4 plus lines of a class with a main function.

But it has lambdas that are not as good as haskell with currying, but quite concise, it has type inference with var (that can even infer the Generic’s arguments), with records class definitions are one-liners.

Properties are verbose but they are absolutely not necessarily for not-bean-oriented codebases.


My biggest issue with Python dev is the env management and tooling around it.

My current favourite is Poetry but it still feels lacking compared to Maven or Gradle.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: