r/AskProgramming • • Nov 01 '21

Other Why do people dislike Java?

I’m a beginner to intermediate programmer, and I’m curious why people dislike Java. I’ve worked with a few different languages (c++, Java, python, c#), but the only one I actually disliked was python and that’s because of how annoyingly different it was. Is there a aesthetic reason for why people dislike Java (like disliking python for the white space) or is it something more like how the language works (like [insert something low level that I don’t know about another language])

Thanks!

52 Upvotes

86 comments sorted by

71

u/wub_addicted Nov 01 '21

"There are only two kinds of languages: the ones people complain about, and the ones nobody uses."

-- Bjarne Stroutrsrup, inventor of C++

13

u/Overlorde159 Nov 01 '21

Looking at the other responses, I think that sums it up the most

2

u/[deleted] Nov 02 '21

And then there's Rust

76

u/khedoros Nov 01 '21

Some people don't like how it forces everything into OOP, even when it's not a good fit. Some consider it overly verbose and/or inelegant.

13

u/Delicious-View-8688 Nov 02 '21

I think this is the best answer.

What sometimes happens is that people who come to Python from Java still write programs as if it were Java - making literally everything into classes.

There are amazing videos explaining why you don't need to use OOP for everything (to put it nicely). And I have personally refactored an OOP style Python code written with several hundred lines into something less than a dozen lines of code. I don't go the other way and say only functional paradigm is the best and therefore Haskell is better. Being flexible enough to use multi-paradigm, and basically picking the best way to logic your way around a problem is important. Something that Java does not allow you to do (or at least it teaches the OOP way only).

It is not only a matter of paradigm or style or preference - there are objectively (hahaha) worse code than others. Not saying that the "Pythonic" way is the best - but it does strive for "elegance", and it shows. Not everybody who Pythons write elegantly, and you can write Java in elegant ways too. But it is hard not to notice that the "standard" way of writing Java is not elegant in modern terms, and that the inelegant Python code you see resemble Java...

2

u/[deleted] Nov 02 '21

There are amazing videos explaining why you don't need to use OOP for everything (to put it nicely).

If it's not too much trouble, can you link some videos like that? I'm a noob at this, and interested to learn more.

4

u/Delicious-View-8688 Nov 02 '21

Sure.

A couple. Just a note though, the message should be that you shouldn't use classes for everything. As opposed to never use classes.

https://youtu.be/o9pEzgHorH0

https://youtu.be/QM1iUe6IofM

7

u/balefrost Nov 02 '21

I agree with the sentiment that we don't need to use classes for everything. But man, I really disagree with that Brian Will video (the second one).

His thesis is that encapsulation does not work at small levels of abstraction. To illustrate that, he constructs an example OO system in which objects follow a strict ownership hierarchy with no reference sharing. Messages are passed up and down the ownership hierarchy. He indicates that this is the "correct" way to do OO, but that it doesn't work in practice.

But here's the thing... nobody writes code like that. Shared object references are perfectly fine. He even admits that nobody does this - that he's arguing a strawman. Furthermore, earlier in the video (around the 17:00 mark), he explains that the OO community has generated a succession of ideas about the "one true way" to do OO, but none of them have ever proven to be universally correct. He essentially argues against dogma and cargo-culting, but then makes a very dogmatic argument.

Based on his strawman example, I think he fundamentally misunderstands what encapsulation is. I think he sees it as a tool to control WHO can interact with an object. In actuality, it's a tool to control HOW an object can be manipulated. Encapsulation is used to define an API for the class and to provides a boundary where class invariants can be enforced. It's about the object sans the context in which it is embedded. A class can be well-encapsulated independently of where it is used.

Heck, we've been employing encapsulation since long before OO languages were a thing. Think about file IO in C. Think about a FILE data type. What is it? It's not specified by the standard. You can look at your system's header files to see exactly what it is in your environment, but none of those details are portable. For all intents and purposes, FILE is opaque. And what can you do with a file? Since you can't actually inspect its inner structure, the only thing you can do is to pass it to other standard library functions that accept a FILE*.

So you have an opaque data type and a set of functions that let you interact with that data type. That sounds like encapsulation to me! Fine-grained encapsulation at that!

I agree with some of the points that he makes toward the end of the video. I agree that single-dispatch polymorphism is weird and that it can be hard to allocate verbs to nouns. I agree that we shouldn't be afraid of long functions. I've seen code that has been made much more complicated by well-intentioned attempts to "chunk" it into smaller pieces. I agree that sometimes, the natural "scope" of encapsulation is module-level, not class-level.

But he spends something like 25+ minutes making a poorly constructed argument against something that nobody is actually advocating for.

Ultimately, I feel like this video spends a lot of time saying very little of substance. I see it referenced a lot and I just don't quite get why. For me, it does not come close to being (as he puts it) "the most important programming video you'll ever watch".

2

u/Delicious-View-8688 Nov 02 '21 edited Nov 02 '21

Yeah.

I mean, I am not like that guy and I am not going to defend his position or anything. I prefer the first guy - specially in the context of writing idiomatic Pythonic code. All I was pointing out that some people bring some styles from Java, which led to the designs you see in the first guy's video, and I have seen my fare share of this too.

I will add two things though,

  1. ultimately, these paradigms help (or distract from) writing better code and that's why I like multi-paradigm. Some really old school people maintain that there is nothing new under the sun and even the good bits of OOP are actually borrowed from procedural programming. (https://youtu.be/eEBOvqMfPoI)

  2. that second guy is not alone in his dislike of OOP it seems... the FP community seem to think that pure FP is where it's at. Maybe they're right. I'm not sold on that just yet.

EDIT: Actually I just remembered a better video - one that reasons about evolving OO to Data-O through game dev using Rust. https://youtu.be/oHYs-UqS458 I don't Rust or dev games, but I think it makes good points. "players damaging themselves" was a good point.

2

u/balefrost Nov 02 '21

Oh, that looks like a neat video. I like that it seems to talk about real lessons learned. I'll definitely get around to that later.

On the FP / OOP side, I still think that the Gary Bernhardt talk "Boundaries" is a good one. I think he and I both arrived at similar conclusions. I think pure, immutable data is easier to reason about. But monads are a pain, so it can be useful to "wrap" our immutable state in a mutable shell.

1

u/[deleted] Nov 02 '21

Just a note though, the message should be that you shouldn't use classes for everything. As opposed to never use classes.

I'll keep that in mind, tysm dude

2

u/[deleted] Nov 02 '21

you can also look into dataclasses. https://youtu.be/vBH6GRJ1REM

2

u/Nathan1123 Nov 02 '21

Exactly this. Do a simple hello world program in each language and you immediately see how overly verbose Java is:

Python: print("hello world")
C++: cout << "hello world");
Java: System.out.println("hello world");

1

u/Blando-Cartesian Nov 02 '21

Some people don't like how it forces everything into OOP

It really doesn’t any more than C++ for example. Old frameworks and libraries from OOP fad days for sure, but not java itself when used properly.

1

u/khedoros Nov 02 '21

Everything in Java is a member of a class. The same can't be said of C++.

1

u/Blando-Cartesian Nov 02 '21

For static members of a class, class is practically a namespace. Not in technical detail of course, but practically.

1

u/[deleted] Nov 13 '21

I found it very verbose.

I'm an explicit programmer when it comes to class and naming conventions, but holy hell sometimes reading Java code is a chore.

Kotlin, on the other hand, was a joy to work with. I did it for a summer internship and fell in love with it.

0

u/[deleted] Nov 01 '21

[deleted]

33

u/dragonwithagirltatoo Nov 02 '21

This is basicly a perfect description of why I prefer C# to Java.

8

u/SoiledShip Nov 02 '21

For some good comparisons that further your point compare linq in C# to streams in Java. Streams is like a caveman learning to use a square wheel and linq might as well be a rocket.

6

u/grave_96 Nov 02 '21

C# = Microsoft Java

0

u/[deleted] Nov 02 '21

[deleted]

3

u/jmhimara Nov 02 '21

I prefer the F# variant myself, but yeah, everyone says that there's some really smart people over at Microsoft research.

1

u/grave_96 Nov 02 '21

it's a meme/joke on r/ProgrammerHumor .

0

u/[deleted] Nov 02 '21

[deleted]

2

u/grave_96 Nov 02 '21

i'm sorry grandpa .

0

u/[deleted] Nov 02 '21

[deleted]

2

u/grave_96 Nov 02 '21

well i'm 23 and already have gray hair(a lot of them) , so we are same i guess .

0

u/[deleted] Nov 02 '21

[deleted]

→ More replies (0)

-1

u/Jestar342 Nov 02 '21

Switched everything to Java from C#? Really?

Forgive me for assuming that is an embelishment of what actually happened.

0

u/[deleted] Nov 02 '21

[deleted]

0

u/Jestar342 Nov 02 '21

I'm more than familiar with corporate america (amongst other things in the technosphere) which is why I find it nearly impossible to believe that anyone (let alone tech leaders like CTOs, directors, head of eng.) would throw away any codebase on a whim like what language it's in. Not unless they actively want to be fired.

... and again migrating to cloud doesn't mean throwing anything away.. you'll probably want (note: not need) to change your arch a bit, sure, but throwing away code? Just no. Common migration path for legacy orgs is to virtualize, then move VMs to cloud, then as your product features evolve, break them off into something more cloud native perhaps.

The nearest I can think of to what you describe being a reality is if an org were to drop a framework like Xamarin (C# compiled to JVM binaries) in favour of native Android development (native JVM, usually Kotlin), which is something I hear does happen in a few places but even that's a push to believe is a complete do over, because simply put.. nobody wipes clean and starts over, you migrate steadily.

0

u/[deleted] Nov 02 '21

[deleted]

-1

u/Jestar342 Nov 02 '21

To be clear I don't disagree that a bad decision to migrate to anything was made.. I just don't agree it's ever without a lot metric ton of nuance and/or is ever as simple as "Hey guys, new CTO here, we're dropping C# for Java!"

The cloud thing is believable now that you have added context, but it does contradict what you initially said because the code didn't get thrown away, it got moved - badly. Very different things.

On a side note, I have personally seen enough "custom datacenters" that I am a strong advocate that cloud > any custom datacenter. "Custom" means "quirky" and quirky isn't good. It may even save them enough cash in hardware leasing costs that even a perceived loss of $100m was worth it, too.

14

u/MrSloppyPants Nov 02 '21

I find the programmers that dislike Java are either really new to the industry and therefore were weaned on newer functional languages, or it's the old timers that had to write some real garbage code in Java back in the 90s and it scarred them.

Java is a very opinionated language and it enforces strict OOP principles. If you like that, then it's not that bad (if a bit verbose), but if you don't like that, then it's the spawn of satan. It's still ridiculously popular and used all over the place though.

10

u/Python4fun Nov 02 '21

I'm currently at a point where I don't actually mind Java, but I'd rather not work at a big Java shop that is struggling to convert decades of waterfall into agile/scrum/safe and completely missing the mark. I'm tired of the tech debt and the business people that keep pushing for hard to maintain changes when the code base is already a mess and nobody has time to improve it.

17

u/[deleted] Nov 02 '21

Because a lot of old and bad code is written in Java. Because third of the industry is using Java 8. Because C# is like Java, but clearer, more readable, more consequent.

I personally like it. Strict is good, when you have complexity and big projects

10

u/[deleted] Nov 02 '21

I.think.it.may.be.because.some.nested.classes.are.so.nested.that.they.take.way.too.long.to.type.out.and.understand.like.this

5

u/justingolden21 Nov 02 '21

A lot of people dislike languages because of association, bad things are written in it, general frustration, or to band wagon.

I think a lot of people dislike Java because it's a little too strict / verbose for them. That's how I feel anyway.

12

u/Horatio_ATM Nov 02 '21

My guess? It's that it's owned by Oracle. Sun Java was fine. Oracle Java has that Larry Ellison taint.

4

u/bsenftner Nov 02 '21

Don't look at the language itself, look at the organizations and the surrounding ecosystem that Java has always been embedded. Java is a language designed for a purpose, and that purpose was always defined by "observing and making choices similar yet different from other languages" and "how do we create software faster and with fewer bugs?" Rather than seeking how to do things in a consistent and well designed manner, the Java language designers focused on how other environments are and how to do like them but "better". They ended up with a giant bag of inconsistent different everything. An additional problem with this 3-way approach is the fact that the questions and discussions take place in a committee with senior members of that committee maintaining vested interests in different portions of the language or ecosystem due to ongoing revenues within their employer. The problem with Java is it's associates, and those associates have vested interests that do not have the software developer's best interests in mind.

Plus there have been some incredible Java security issues. I stopped tracking the language when sometime about Java 8 (?) it was found to have an unfixable security issue causing a complete re-architecture of the java virtual machine. That was huge damning news for about 3 months, and then nothing: the Java community choose to simply ignore the issue and it stopped being written about. Clown behavior like that is why I don't even bother anymore with anything Java.

1

u/Muoniurn Nov 15 '21

Wtf are you talking about? What security issue? Java code is meant to be constrained through OS restrictions, it is a Turing complete language, whatever you write will happen otherwise. Yeah it does have a security manager (which is now deprecated) that was used by a few companies but that came from the time of java applets. What issue are you even referring to around java 8?

1

u/bsenftner Nov 15 '21

It was Java 6 that had to completely broken security model, requiring changes to the architecture of the VM. It was huge news for several months in '06, and then nothing. The articles discussing the situation even disappeared. Speculation at the time was these news sites were being paid to remove the articles.

1

u/Muoniurn Nov 15 '21

Ok right… haven’t you dreamed it? :D

1

u/bsenftner Nov 15 '21

I am serious. This was a real event, and it left the then online community of developers (I think slashdot.org was the site back then, like how HackerNews is now) buzzing about how they could just sweep it under the rug.

13

u/KingofGamesYami Nov 01 '21

You'll find that pretty much any language that's widely used is disliked for some reason. Java is/was widely used in enterprise development, so most of the hate comes from people that had no option to change the language they were working with.

In Java's case, the most annoying feature is the verbosity, which is aptly demonstrated by FizzBuzzEnterpriseEdition. Today's Java is less verbose, as features like Type Inference (added in version 10) have been added to make it more manageable.

16

u/[deleted] Nov 01 '21

Nah, that's not a good example of Java's verbosity. It's a parody of enterprise software. Those same poor implementations happen in enterprise software written in every OO language. It's not a fault of the language that idiots write crap like that.

I'd say the canonical example of Java's verbosity is simply

List<String> strings = new ArrayList<String>();

where you're declaring the type (and generic type param) twice. Of course, that's largely fixed with the diamond operator and var.

The other example would be tuples or "data classes", which is largely addressed by records.

6

u/KingofGamesYami Nov 01 '21

I would argue most of what people hate about Java is interacting with code someone else has written in Java.

10

u/[deleted] Nov 01 '21

Same could be said for any language.

5

u/snowe2010 Nov 02 '21

That’s a canonical example, but I find it way better to show an example with streams.

Java

someList
  .stream()
  .map() // some operations
  .collect(Collectors.toList());

Kotlin

someList
  .map() // some operations

Or even better:

Java

Map<Pair<BlogPostType, String>, List<BlogPost>> postsPerTypeAndAuthor = posts.stream()
  .collect(groupingBy(post -> new ImmutablePair<>(post.getType(), post.getAuthor())));

Where ImmutablePair isn’t even built into Java, it’s from Apache Commons…

vs Kotlin

val postsPerTypeAndAuthor = 
    posts.groupBy { it.type to it.author }

Not to mention that Java streams have intermediate and terminal operations and you always have to keep that in mind and Java streams are not reusable. Man I freaking hate Java streams so much.

4

u/[deleted] Nov 02 '21

Those comparisons aren't like-for-like because Kotlin's Iterable.map is eager, while Java's steam.map is lazy.

The like-for-like comparison in Kotlin would be to use a sequence

someList.toSequence()
    .map() // some operations
    .toList()

Java 16 introduced a toList() method on Stream, so Java would now look like

someList.stream()
    .map() // some operations
    .toList()

I think if you're looking for examples where Kotlin is more concise than Java, there certainly are some, but I wouldn't use the streams API as an example. For starters, it's nothing to do with the language. It's part of the standard library. Someone could write a collections API which functions just like Kotlin's.

Smart casts are probably a better example of Kotlin's more modern language features.

3

u/snowe2010 Nov 02 '21

Those comparisons aren't like-for-like because Kotlin's Iterable.map is eager, while Java's steam.map is lazy.

Which rarely matters in usual business cases. For all intents and purposes, using the the eager vs lazy versions of each will not matter in daily business features. Which is why kotlin defaulted to eager rather than lazy. If you are writing performance optimized code then you’re not going to be writing concise code anyway, and you definitely aren’t going to be using default streams, you’re going to be using a parallel stream or hand written for loops.

For starters, it’s nothing to do with the language. It’s part of the standard library. Someone could write a collections API which functions just like Kotlin’s.

Most people consider a language to be the language features and the standard library. It’s one of the massive complaints of js for example. Including proper streams in kotlin is an advantage compared to Java, especially because you don’t have to include some other dependency that needs to be audited, maintained, and updated.

Someone could write a collections API which functions just like Kotlin’s.

This is an old argument. You shouldn’t have to write a library to add functionality that isn’t in a standard library that should be there, like proper functional collections, much less fix something that is already in the standard library.

1

u/[deleted] Nov 02 '21

Which rarely matters in usual business cases.

I didn't say the performance matters. There's a closer, and so fairer, comparison which could have been drawn, but you chose not to draw it because it undermines your argument (or didn't know).

Same with your 2nd example, really. You could have used var in your Java example too but didn't (unless I'm missing something where the LHS is required for type inference? if so, using a type witness might be shorter)

Kotlin is obviously a more expressive language in many ways, but it's possible to demonstrate that in much fairer comparisons than those.

1

u/snowe2010 Nov 02 '21

There's a closer, and so fairer, comparison which could have been drawn, but you chose not to draw it because it undermines your argument (or didn't know).

No, that’s not a closer comparison because that’s not what the discussion is about! The discussion is about language economics so comparing how a user would use one versus the other whether they are implemented the same or not is the correct way to compare.

Same with your 2nd example, really. You could have used var in your Java example too but didn’t (unless I’m missing something where the LHS is required for type inference? if so, using a type witness might be shorter)

You can only use var as a local variable (e.g. in a function) so no, putting that in would also be disingenuous. My examples were valid everywhere in both languages, not just in explicit cases like a function. That’s why any argument stating that Java got type inference in 10 is insincere. It got local type inference, a small subset of valid true type inference.

My comparisons were 100% fair to actual language economics and use cases. Because that’s what the conversation is about, not implementation details.

0

u/[deleted] Nov 02 '21

You can only use var as a local variable

Realistically, where do you see that kind of iteration 95% of the time? Because it's not in the declaration of fields.

If you've wanted to present a fair comparison, you could have explicitly mentioned the fact that var also exists in Java, or that those collection methods aren't lazy. But you're not interested in that. You're only interested in making Java look as bad as possible which is why I said, and maintain, that your examples are bad.

It's quite easy to make Java look bad in comparison to Kotlin. I'm not sure why you felt like you had to resort to inventing these examples.

1

u/snowe2010 Nov 02 '21

If you've wanted to present a fair comparison, you could have explicitly mentioned the fact that var also exists in Java, or that those collection methods aren't lazy.

You’re right, I could have mentioned those. But the question was about why people dislike Java. It’s clear that those elements I left out do not actually affect the enjoyability of Java. Local type inference is a hack to try to catch back up to kotlin, eager vs lazy has no bearing on actual use cases of Java vs kotlin. Once again this is a comparison of usability.

You’re only interested in making Java look as bad as possible which is why I said, and maintain, that your examples are bad.

I don’t really need to make Java look as bad as possible, it does that fine on its own. I provided actual use cases with actual examples of things I’ve actually encountered. You seem to think that this means my examples are bad. I think contrived examples you’ll never encounter (like yours, where you provide an example and then immediately remark that it’s fixed with the diamond operator) are much worse.

I’m not sure why you felt like you had to resort to inventing these examples.

I didn’t invent anything. These are actual things I’ve encountered while converting a decade old wildfly swarm Java monolith to Kotlin. I’ve been using Java for more than a decade and Kotlin for about 6 years now, I have plenty of terrible examples of Java, I don’t need to contrive anything.

0

u/[deleted] Nov 02 '21

I’ve been using Java for more than a decade and Kotlin for about 6 years now

Congratulations. That's not an argument

I provided actual use cases with actual examples

This is quite literally impossible, unless you copied and pasted code which was converted from Java to Kotlin, where the original author used the identifier "someList", and the person writing Kotlin decided that was a perfectly acceptable name.

I don’t need to contrive anything.

Yes, your examples are quite literally contrived.

1

u/balefrost Nov 02 '21

Or automatic type inference. I believe that's now (since Java 10):

var strings = new ArrayList<String>();

3

u/[deleted] Nov 02 '21

Yeah, I said it

that's largely fixed with the diamond operator and var.

1

u/balefrost Nov 02 '21

Sure, I was just providing an explicit example to contrast with your example.

1

u/PartOfTheBotnet Nov 02 '21

You can get away with <> if the usage of strings implies the generic type.

4

u/jmhimara Nov 02 '21

You'll find that pretty much any language that's widely used is disliked for some reason

I think part of it is that a lot of these popular languages have the kitchen sink crammed into them, in terms of functionality. Python is a good example. It's huge, very useful, but also very inconsistent.

Everyone seems to love Rust though....

2

u/skellious Nov 02 '21

i studied Java last year in CS and the course was so old we were on Java 8 still. it was infuriating having to ignore all the amazing features later editions had.

9

u/[deleted] Nov 02 '21

There really aren't many "amazing" features after Java 8. Java 8 is perfectly fine. I work on different projects which are on different Java versions, Java 8 being the lowest, and I never feel particularly limited by it.

Modules were the biggest thing in 9 and most people don't use them. 10 had the var keyword. Pretty good but Lombok already did it. 11 has a decent HTTP client, but there are plenty of libraries which do that. Java 16 has records. Good, but Lombok already did it.

There were some significant advances in garbage collection, but you can take advantages of those by writing Java 8 code and running it on a more modern JVM.

If you know Java 8, you more or less know Java 16. Yes it sounds like "twice as much", but the releases since Java 8 have been small, incremental improvements.

3

u/skellious Nov 02 '21

we werent allowed to use anything other than the standard library or any IDE other than the stupid BlueJ one.

i guess it frustrated me because ive been working with modern python and all its wonderful modules for years so not having any of that was frustrating.

2

u/boki3141 Nov 02 '21

I felt that BlueJ was a good way to introduce some fundamental concepts of the language and programming in general. If you already had some experience programming I imagine it would have been annoying.

6

u/joshlemer Nov 02 '21

I actually don't mind Java-the-language, and really enjoy Java-the-platform, but Java-the-ecosystem is for me just soul crushing. Spring, Hibernate and all the rest of these magical annotation-based tools are for me just completely inscrutable and I'm not interested in using them. I'd rather either use code, or use data, and not be forced to express so much in annotations.

I'll also just leave this rant here https://youtu.be/aSEQfqNYNAc

3

u/duxbuse Nov 02 '21

This is the real reason. Annotations are an abomination. It directly violates the explicit requirement for readable code.

Though my main concern is that if a company uses Java it’s probably a 10+ year old bit of software that has been too critical and expensive to update or upgrade and is drowning in a pile of tech debt. Which also means that the dev team is considered a second class citizen whom have no autonomy or else they would have fixed the problem already. Companies like this don’t value their developers and the culture there is toxic. So yeah no thanks I’ll go work somewhere else.

Basically I don’t hate Java but I do hate workplaces that use Java

6

u/[deleted] Nov 01 '21 edited Nov 01 '21

The primary reason is that Python is (arguably) a "higher-level" more expressive language than Java. That means it (usually) takes less code to write the same program in Python as it does Java.

Less code (generally) means less bugs and more productive engineers. I remember writing my first Python program in college after a heavy diet of Java and C++, and I was blown away that it just worked correctly the first time I ran it.

Obviously in reality different programming languages have different things they are good at, and there are many circumstances where it makes sense to use Java instead of Python. The above is just a general explanation of why some people prefer Python.

13

u/[deleted] Nov 01 '21

They are both high-level languages. What you mean is that Python is more expressive.

3

u/[deleted] Nov 01 '21

Thanks for the correction, that's the word I was looking for. I'll edit my comment

0

u/[deleted] Nov 02 '21

[deleted]

4

u/[deleted] Nov 02 '21

Your link is broken. It included a lot of what you wanted to be plaintext at the end.

But that same wikipedia article already uses concision as one meaning of 'expressive'.

The term expressive power may be used with a range of meaning. It may mean a measure of the ideas expressible in that language:[2]

regardless of ease (theoretical expressivity)

concisely and readily (practical expressivity)

So yes, 'expressive' is fine.

4

u/sohang-3112 Nov 02 '21

Try any other language (like Python, C#, etc.) for a significant amount of time - then you'll probably find plenty to complain about in Java's syntax.

Even C++, which Java is supposedly an improvement over, is IMO much better than Java. For one thing, C++ doesn't force you to shoehorn everything into a class - and it allows many abstractions that Java simply can't. Even when C++ is verbose, it at least has a reason for the verbosity. In fact, Java was originally designed as a dumbed down version of C++!

1

u/kidfromtheast Nov 02 '21

Because Java is not necessarily a specific tool. It is a general purpose programming language, one that you can use for everything.

And then people started to use "expressive" programming language such as Python and then "cloud first" programming language such as Go.

These comparisons are translated as "complaint" and "hatred".

Well, you can argue Python and Go is also a general purpose programming. However, no one can argue that Java is present is everywhere.

Just... use what you like.

If you don't complain, chances are you don't know your code.

1

u/rvrtex Nov 02 '21

Honestly, I dislike it due to how hard it is to read their documentation and find answers to problems with it. I have not used it for close to 7 years but I had to learn in school. We learned Java and C#. The school I went to was a projects school so a lot of learning was not done with lectures but with reading the docs and figuring things out (like the real world).

In c# the docs were so much easier to read, they had examples, and the version you were looking for was clearly labeled. In Java it was not. You google and issue and you find a solution in the docs but the version was not clearly labeled. Pretty much spent to much time trying to find the right resources so I could do my project. Spent way less time in C#. Hated it ever since.

1

u/portol Nov 02 '21

Personally, it was the brackets. So many brackets

1

u/Stevecaboose Nov 02 '21

Because java is just c# with extra steps

-1

u/vegetablestew Nov 02 '21

Dated. Very verbose yet not very expressive. Has their own version of everything that starts with the letter J.

-3

u/yel50 Nov 02 '21

compared to other languages, it's quite verbose. contrarily, though, it requires the least amount of typing because a good IDE will insert most of it for you.

personally, I find Java to be the best language for rapid prototyping and exploratory programming. the more complex a project gets, the better suited Java becomes for it.

however, I find the new streams stuff to be a horrible idea and the ecosystem is unbearable. maven and gradle were bad ideas when they first came out and they're even worse now. spring is such a horrible pile of garbage I won't even apply for Java jobs anymore because everybody uses it and I'd rather go back to fast food jobs than use it on a daily basis.

8

u/[deleted] Nov 02 '21

What you do you mean by "the new streams stuff"? java.util.stream or reactive streams? The former has been out for 7 and a half years.

Maven is the best build tool/package manager of any language I've used. XML is verbose, but you touch a build config so infrequently that I find it doesn't matter. There are a few weird quirks of the lifecycle too. Can you name a better one?

0

u/[deleted] Nov 03 '21

[deleted]

3

u/[deleted] Nov 03 '21

I haven't used Cargo so I can't compare. I've used all 3 of Java's, NPM, Gulp and a similar combination of C++ tools to what you mentioned (+ Conan).

Ant is bad. It's too procedural, too script-y. Not enough focus on re-use. In practice, often ends up being platform-specific.

Gradle was a bit of a false prophet. Don't get me wrong, it's fine. DSL is an improvement over XML but that's not enough in itself to switch. I think the community generally agrees that Gradle wasn't a significant improvement on Maven, because usage of Gradle kind of peaked and waned, whereas Maven is as popular as ever.

NPM is fundamentally broken in several different ways, e.g. the way it reports security vulnerabilities. No real plugin architecture, everything's just scripts. No standardized way of doing simple tasks.

Maven almost never feels like it's getting in my way. The mental model is intuitive, at least for me. There's definitely room for something better, but I think Gradle showed that improving on Maven is easier said than done.

4

u/bigboi26 Nov 02 '21

You said you dislike a number of things without any reasoning as to WHY or ANY suggested solutions/alternatives and why those are better instead.

I find this comment a horrible pile of garbage instead

0

u/SeleVlad Nov 02 '21

Java is disliked, or at least I dislike it, because C# is way better. When you start working with C# everything is way clearer and easier.
There are too many annotation between Spring, Hibernate, etc. Also, the dependencies tools like Maven, Gradle are way harder to configure than the NuGet manager from .NET.

In short Java is less clearer, requires more time to configure and usually to do stuff overall than other languages.

-6

u/dsound Nov 02 '21

I like JAVA……script!

0

u/[deleted] Nov 02 '21

[deleted]

2

u/[deleted] Nov 02 '21

This is a great response.

There's programming for fun. And then there's shit that needs to get done :-)

2

u/[deleted] Nov 02 '21

What s wrong with complaining about things you don t like about a programming language? if enough users see that as a shortcoming maybe it will be added to a language in future releases

0

u/[deleted] Nov 03 '21

[deleted]

2

u/[deleted] Nov 03 '21

this part threw me off

If a programming language feeds my family then I won't complain about it

yeah, of course anyone can use whatever they like. And really, java is not a shitty language. It really shines when used right.

1

u/Delicious-View-8688 Nov 02 '21

This is a mature answer.

At the end of the day, unless you own your own company, you work for someone. Whatever they have chosen is the tool you work on.

If your pizza shop tells you to put pineapple on your pizza, you throw them pineapple on them pizza. And hey, if they sell well, they make money.

0

u/[deleted] Nov 02 '21

[deleted]

3

u/[deleted] Nov 02 '21

Or destroy them with stats.

But do it in such a way that it covers you in glory, without making your colleagues/managers look too foolish.

0

u/[deleted] Nov 01 '21

[deleted]

4

u/MrSloppyPants Nov 02 '21

Tell me you have very little actual experience without telling me

3

u/maxximillian Nov 02 '21

It's cute that you think it was laziness and not what drives every fucking decision in business, budget. If I take 5 year to make ports of my software when someone writes something similar that runs on all architectures today then my 5 year software might as well be dead on arrival. If I'm bidding for a contract and I say well we have to make 5 ports and thats going add 100k, and my competitor says I can get that software on all architectures cheaper, who do you think is going to get the contract?

There's no way you're serious with this post, no software developer can be this think headed.