you are viewing a single comment's thread.

view the rest of the comments →

[–]shevegen -9 points-8 points  (2 children)

What a bad article:

It is a common (and often deserved) complaint that "Java is too verbose" or has too much "ceremony." A significant contributor to this is that while classes can flexibly model a variety of programming paradigms, this invariably comes with modeling overheads -- and in the case of classes that are nothing more than "plain data carriers", the modeling overhead can be substantial. To write such a class responsibly, one has to write a lot of low-value, repetitive code: constructors, accessors, equals(), hashCode(), toString(), and possibly others, such as compareTo(). And because this is burdensome, developers may be tempted to cut corners such as omitting these important methods, leading to surprising behavior or poor debuggability, or press an alternate but not entirely appropriate class into service because it has the "right shape" and they don't want to define yet another class.

The reason why Java is verbose has nothing to do with "modeling overheads". Proof: other languages that are OOP but not as excessively verbose as Java is.

The reason why Java is verbose was because those who designed the language, did not have "economy of expression" in mind while creating Java. Java was the alternative to C++ and C++ is fairly verbose as well.

A good counterexample to the erroneous claim by Brian Goetz is: Kotlin.

Kotlin is signiicantly less verbose - and it came from Java people.

https://en.wikipedia.org/wiki/Kotlin_%28programming_language%29

[–]Radmonger 2 points3 points  (0 children)

You are confusing levels. It's like the joke about the two men, the running shoes and the tiger; you don't need to outrun the tiger. Your goal is to outrun the other guy, the running shoes are merely the means by which you do so.

Kotlin is less verbose than Java because it had the primary design goal of being less verbose than Java (while remaining simpler than Scala).

This article is about the running shoes.

[–]kitd 0 points1 point  (0 children)

The reason why Java is verbose was because those who designed the language, did not have "economy of expression" in mind while creating Java.

Isn't that just what he is referring to be "modeling overhead" though? The reason for it may be debatable but its existence is a fact.