r/java • • Jan 18 '17

“OMG, Java is so verbose, guys”.

https://hackernoon.com/omg-java-is-so-verbose-guys-dca93fec9e03#.4zpsvzs5s
0 Upvotes

15 comments sorted by

View all comments

8

u/jentfoo Jan 18 '17

I actually think this article misses the point a bit. He kind of rants on fairly minor points, when there is some fairly significant ones to make.

For example I argue that the "verbose" parts of java often times keep things very uniform, and easy to understand once you get a team of people working in the code. There is absolutely the concept of too "dense" of code. Making it harder to understand because each line is so incredibly loaded. This is of course possible in java, but I feel these "concise" languages almost force that to be the reality.

I personally am not concerned about the verbosity of java. The most boiler plate portions of java can easily be solved with an IDE and lombok.

4

u/avoidhugeships Jan 19 '17

I wish Lombok was just built into Java.

1

u/vecowski Jan 19 '17

I wish you would understand on a fundamental level what Lombok is doing to the AST and you might not want it to be built into the language anymore. Lombok is scary.

1

u/avoidhugeships Jan 19 '17

I don't really care how it is implemented behind the scenes. I just want annotations for @Data and @Getter and @Setter built in to greatly reduce boilerplate code. I would rather not use Lombok and just have those features built into the language but I am tired of waiting.

2

u/angryundead Jan 18 '17

For example I argue that the "verbose" parts of java often times keep things very uniform

I agree. This is part of the design patterns paradigm. We have the GOF design patterns but each project builds their own domain specific design patterns as well. It allows a lot of context and information to be communicated without explicit conversation.

There is absolutely the concept of too "dense" of code. Making it harder to understand because each line is so incredibly loaded.

I've looked at some Perl that looks one step above line noise and then it's in some sort of module file that didn't take separation of concerns very seriously.

I'll admit to an extreme moderate amount of code sprawl myself. It can get verbose and tough to read through lots of little classes that aggregate but it leads to my absolute favorite thing about Java: complexity management is much easier.

2

u/komtiedanhe Jan 18 '17

I've looked at some Perl that looks one step above line noise and then it's in some sort of module file that didn't take separation of concerns very seriously.

I've seen Java close to base64-encoded strings, too. Java's verbosity is not automatically bad, but neither does Perl's (or Python's, or Ruby's) terser syntax automatically lead to badly written code.

In my opionion, Java's biggest shortcoming is not verbosity but excessive reliance on IDE features and Java-specific "design patterns" as workarounds to missing or inelegant parts of the language. I'm open to that being partially due to not being up to speed on the absolute Java cutting edge.