3 ms·
People in the thread have given a few different reasons why Java is verbose but in my opinion, it's not so much the language specifics or the culture but the co
by Barrin92 7y ago
People in the thread have given a few different reasons why Java is verbose but in my opinion, it's not so much the language specifics or the culture but the combination of static typing together with the inheritance and class-focussed design.
A lot of the terseness of other languages is the result of dynamism (Ruby, Python) and so on which basically gives you two thirds of the infamous patterns that people complain about more or less for free, and for other static languages that are predominantly functional a lot of the boilerplate simply does not exist because the primary unit of computation is the function and that spares you a hell of a lot of complication.
It's the C++/Java class of languages that all suffer from the same verbosity and complexity and I don't think it's because the particular languages do anything wrong specifically but that the combination of paradigms simply leads to large, complicated structures.
- boterock 7y agoI've always felt that having "private" fields by default (thereby suggesing it is the right way to code), making all code live inside classes, and thinking everything as an object, are dogmatic assumptions that make you write a lot of boilerplate as you move forward (getters/setters, constructors, etc...) If you could write your functions out of any class, you get 3 lines an an indent level less, which I think reduces the cognitive load. you could change your private fields to be by convention instead of forced just by prefixing m_varName or whatever... I dislike java because I feel the language somehow doesn't trust the developer to know well the system he is coding. It is like handing a blunt knife to a chef expecting he doesn't know how to handle it, making his work annoying, but if he has to work for more time, he can bill more hours right?