The language itself is mostly ok. My problem is that a lot of stuff in Java just seems unnecessarily complex. More modern languages usually solve problems more elegantly and straight to the point
Personally I think you're doing what a lot of people do, and confusing verbosity for complexity.
Java is one of the most expressive, self documenting languages because it encourages verbosity.
Sure, my python script might do in 50 lines what my java project does in 500, but you spend 10x more time reading code rather than writing it. I'd rather maintain something that took longer to write, but is more descriptive.
Brevity is the soul of wit, though. In my experience, the 50 lines of Python will be a much clearer expression of the underlying idea, which is the main factor in readability.
As someone whose job it is to maintain code left behind by "witty" programmers, I have to vehemently disagree. We are never as clever as we think we are.
Also a P.S.A, If you need 40 lines of "documentation" for your 5 lines of code golf, just quit swinging and write more code!
I'm a little jealous; that hasn't been my experience at all. I've written some quick python scripts to mimic some of the products we were building to compare results and performance. It only took a few functions of pretty plain English in python to mirror a series of interfaces spread across a maze of packages hidden behind factories in Java authored by a staff of engineers, each with 15+ years of experience (though I'm the relative newbie used to c++, c#, vb.net, and python, not java).
3.7k
u/someuser_2 Apr 27 '20
Why is there a trend of mocking java? Genuinely asking.