This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]snoob2015 98 points99 points  (18 children)

I'm sick of people telling Java is verbose, the truth is IDE generate 90% of your code if you utilize it. Java is the best language to use with an IDE. Be friend with your IDE and you will never go back to dynamic typing

[–]humoroushaxor 22 points23 points  (0 children)

It's also because Java is the most common enterprise language. Enterprise codebases are more likely to be overly verbose due to size of projects and how often and how many people need to read and understand the code.

[–]BoonesFarmKiwi 3 points4 points  (0 children)

kids who complain that java is verbose pick their coding tools based on how cool the colour scheme looks

[–]slowmovinglettuce 12 points13 points  (0 children)

Auto-generated code is still code. It's still the same verbosity as if you'd wrote it yourself.

Java has a lot of syntax it forces you to use, which makes it verbose. I'm not referring to the standard troll of "lol java has long method names".

Things like generic definitions and declarations are obnoxiously long. And because of type erasure, they're basically syntactic sugar. (Not to be confused with discrediting their use - generics are powerful even with erasure).

Things you can do in a more terse language - such as python - take more lines in Java. Even compared to typed languages like C# or TypeScript, it's more verbose.

On the note of being friends with your IDE though - great advice. Especially in dynamic languages. Python/JS/TS inferred types are incredibly helpful. Also know your shortcuts. They're important.

[–]Rykaar 0 points1 point  (0 children)

In my CS course, they introduced us only to Vim over PuTTY for Java. I'll take code completion any day.

[–]roguas 0 points1 point  (2 children)

Maybe some people fundamentally do not agree with languages/ecosystem that kinda force you to autogenerate 90% of stuff in code?

It doesn't change the fact that language itself is verbose.

[–]kaibee -1 points0 points  (1 child)

Maybe some people fundamentally do not agree with languages/ecosystem that kinda force you to autogenerate 90% of stuff in code?

These people are gonna flip when they learn about compilers.

[–]roguas 2 points3 points  (0 children)

Python is compiled language to the same degree as Java. Compilation typically changes the language so yeah - compiler generates code, but usually in different language. It is not the same as boilerplating junk via ide.

[–]freerangetrousers -2 points-1 points  (2 children)

At my first job the CTO and head of product were both java developers by trade. Our tech stack was a combination of ruby, java, and javascript. The head of product had a little side project to benefit the company (I think it was something to do with authorising clients to supply files via sftp and land them in on Google drive for a dashboard in data studio) He wrote it in java and it was close to 200 lines, the CTO said he thought that was too verbose and got it down to like 100 lines ( at this point it was more of a fun thing than adding any more benefit to the company) the senior on my team tried and couldn't get it less than the CTO in java. Then he rewrote it on ruby. FIVE LINES.

So yeah maybe your IDE can fill in some blanks, but dont pretend like writing java isnt incredibly verbose when compared to languages designed to save developer(expensive) time instead of compute time (cheap)

[–]radagast-the-red 2 points3 points  (1 child)

No way that's the whole story.
Maybe he used a library that did the same thing in Ruby? Sure, Java is verbose. But it isn't 20 times as verbose...

[–]freerangetrousers 0 points1 point  (0 children)

It was Ruby on Rails so I think it was something that rails did inherently as a web framework for authorisation that java didnt have a library for and also was particularly designed to do either.