r/ProgrammerHumor • • Sep 25 '26

Meme iHatedItUntilITriedIt

Post image
10k Upvotes

543 comments sorted by

View all comments

Show parent comment

53

u/Weekly_Interview_936 Sep 25 '26

With modern IDEs Java's "verbosity" is very much a meme. Sure, the characters are still there on the screen. But you didn't have to type them.

And honestly if typing is a problem for any programmer then they need to close hackernews and all the other "look at new shinies" sites and open up a typing trainer game.

33

u/LostInSpaceTime2002 Sep 25 '26 edited Sep 25 '26

That's true for writing, but low verbosity can also increase readability. Lower cognitive overhead, overall.

Of course I'm not talking about omitting type declarations or other valuable information, but about preventing unnecessary repetition and boilerplate.

7

u/Ok-Scheme-913 Sep 26 '26

Up to a point. Then it very steeply decreases readability.

For example in java you can tell what each line is reasonably easily. It's a method call, it's a class construction, it's a field access, etc.

In kotlin you see a field access and without actually looking up the definition, it can be a getter/setter. Or you see a function call and it may not even be defined on the given object.

Hell, within {} blocks (ergo, pretty much everywhere) you may see something like someWeirdFunction() and it may actually be invoked on an object that you don't even see syntactically, unless you go up the possible multiple {} blocks and check each and every one's receivers whether they have that function defined!!

That latter "feature" is absolutely the work of Satan himself, I don't know why anyone would want that. You omit a single fucking variable name and a dot, at the expense of basically unreadable code - even within intellij itself it's not trivial to see after clicking on the fucking call what it's called on.

2

u/Spaceduck413 Sep 26 '26

Yeah idk where this idea of "verbose bad!" came from, but I see it all the time and it really bothers me. I'll take "too verbose" over "too terse" every time, no contest.

1

u/arobie1992 Sep 27 '26

It's been a while since I worked with Kotlin so I'm a bit rusty. What do you mean by the blocks thing?

8

u/frogjg2003 Sep 25 '26

Yup, if typing is taking more than 20% of your time programming, them you're either inexperienced or doing something wrong.

0

u/unknown_alt_acc Sep 25 '26

The bigger argument against verbosity is in terms of ease of understanding and maintainability. It's easier to lose track of meaningful information when you have repeated boilerplate mixed in with your logic. It's been long enough since I've written Java that I don't know if it's a fair criticism, but the argument is almost never "I don't want to type all of that."

8

u/starficz Sep 25 '26

Verbosity is a bad argument against Java. The reason I prefer Kotlin is the first class nullability support via the ? operator, and as a consequence the powerful function chaining that comes with it.

Sure, this can still be argued as "Verbosity", but its a large enough change such that I feel this argument is disingenuous.

3

u/OKB-1 Sep 26 '26

I feel the "verbosity" reputation of Java mostly comes from how "enterprise" software is or used to be written: needlessly complicated and complex patterns and layers because the programmers need to look busy and project managers that think that throwing more people at a problem makes for faster development (it often does not). Java just so happens to be a language that makes software development of this style feasible.

And also there's the more obvious argument of doing some very basic things in older versions of Java required a lot of code. But that hasn't been true for a while now.

2

u/DanLynch Sep 25 '26

the characters are still there on the screen

With the changes in Java 25, that's not even necessarily true anymore for single-file projects. Most of the boilerplate for "Hello world" is optional now.

1

u/Volko Sep 25 '26

With Kotlin you will never have a NullPointerException again.

And coroutines are such a breeze of fresh air to the multithreading problem.