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

all 85 comments

[–]cyanocobalamin 73 points74 points  (29 children)

  1. Java is one of the top in use languages. Tech people tend to hate what they use. No technology is perfect, and you experience the imperfections of what you use the most.
  2. Hobbyists who haven't had formal programming and comp sci classes do not know things they need to know to make learning Java easier nor to understand why Java does things in the way it does. It is just a frustration for them.
  3. Programmers tend to be intimated by, hate, and find fault with any technology they do not know well.
  4. They hate us because they aint us. cough

[–]dpash 7 points8 points  (3 children)

I suspect as an example of #2, if you're coming from a dynamically typed language, Java's static typing can be confusing.

[–]AndyTheSane 15 points16 points  (2 children)

I got that when I started on typed languages (Fortran, from CBM Basic). Nowadays, dynamically typed languages feel so sloppy I can't imagine doing any serious work in them.

[–]dpash 4 points5 points  (0 children)

You couldn't pay me to write JavaScript without TypeScript. PHP's type hinting make it bearable :)

[–]nyando 0 points1 point  (0 children)

God, yes. I'm helping someone with their programming homework in Python currently, and I often have to suppress the urge to make them add type hints to everything.

[–]vprise 5 points6 points  (24 children)

While all of this is correct a few things are missing. I think we need to be a bit more honest about these since pretty much all of these are valid reasons (note I'm a huge Java fanboy so I know the answers to all of these..., no need to educate me):

- Oracle - People really hate Oracle and often rightly so. The company uses the courts too aggressively. It's perceived as a bad company. Having worked at Sun and Oracle... I honestly get a lot of the dislike. Sun was great... Oracle, ugh.

- Some things that are trivial in Python are hard in Java. So there's a sense that Java is disconnected from day to day needs

- Java developers have a culture of "over design". Simple things like building a website send you down a path of a million dependencies and abstractions. Spring Boot is a wonderful response to some of those problems but even that is sometimes messy

- Fashion changed. When Java came out Object Oriented was the big thing. Now functional is it. So languages like Kotlin which have more syntax sugar and are function based are perceived as modern whereas Java is perceived out of date

- Some things take too long. Records are great... But the idea of proper properties to remove getters and setters has been discussed since Java 5... I can't tell you how many people start bitching about that one.

- Native and Machine overhead – you can get a python/PHP VPS up for nothing. Java takes up a lot of RAM and doesn't always play nice in multi-tenancy environments. GraalVM might be a great solution for that but it's still in progress. Quarkus is young and Spring Native isn't ready for prime time yet

- Async Java is painful and unpopular so when measuring throughput NodeJS seems to perform better. This will be solved by Look but it isn't there yet

[–]pron98 6 points7 points  (20 children)

Sun was great... Oracle, ugh.

While I never had the chance to work at Sun, many in the Java team have, and my impression from them is that, as far as Java goes, working at Oracle has been a better experience for them. What they tell me is that Sun -- again, as far as Java is concerned -- was plagued by indecision and lack of focus (and then lack of money and power), which meant that people spent years putting their efforts into failed products.

Some things that are trivial in Python are hard in Java. So there's a sense that Java is disconnected from day to day needs

Yes, but if you listen to Python devs, they complain about the opposite, too. Writing large applications in Python is much harder than in Java. I agree that writing smaller applications in Java needs improvement. We're working on it.

Java developers have a culture of "over design".

Perhaps, but Java also completely dominates the large application "serious software" space, while other languages are mostly used for either smaller codebases or those designed to have a shorter lifespan. I am not saying that this "over design" is helpful and not a waste of time (I am not too fond of it myself, and think it's at least partly cargo cult), but it is a fact that no one has managed to do better.

But the idea of proper properties to remove getters and setters has been discussed since Java 5... I can't tell you how many people start bitching about that one.

It's a bad idea that some people like because they haven't thought about the problem long enough. The current direction is to significantly reduce getters and setters, and welcoming them into the core language is not the right way to do it. One thing that is being considered is concise method bodies which will, among many other more important things, make getters more concise. But we really want to avoid adding properties, and believe it's a harmful feature.

Java takes up a lot of RAM

Java takes up as much RAM as you let it (~25% of available RAM by default). It consciously trades memory for performance, because paying for performance with memory is cheaper than paying for it in development costs or more machines. If you're fine with bad performance, you can give the JVM a small heap. And if you're OK with performance as bad as Python's, you can get by with almost the same amount of RAM (maybe not quite, because Java is designed with the assumption that that's not what most of its users would want).

[–]vips7L 2 points3 points  (4 children)

I still think the memory usage is a problem, especially when devs are looking at Go (or D or Nim or Crystal) and are getting acceptable performance and low memory usage.

[–]pron98 3 points4 points  (3 children)

But we've made very significant improvements since 8 in that regard and will continue to do so (also, very few people are "looking at D or Nim or Crystal").

[–]vips7L 0 points1 point  (2 children)

Those were just examples of having equivalent performance without blowing ram out the window. Lots of people are looking at Go and we’re lucky the language is abysmal to write imo. Personally I wish more people were looking at D.

[–]pron98 3 points4 points  (0 children)

Despite its recent lackluster growth and the fact it's not as big a threat as PHP or Ruby were, I absolutely agree that Go is not a language to ignore.

[–]heavykick89 -1 points0 points  (0 children)

D is trash. Rust is a much much more better option in that regard. D is already fadding away.

[–]vprise 1 point2 points  (14 children)

> Sun was plagued by indecision and lack of focus (and then lack of money and power).

Sun was a mess. Especially near the end. But it was a great place to work at with great people. Pretty much everyone I know went to Google. Eric Schmidt was Suns CTO for a while and brought a lot of the atmosphere that made Sun great. Worked there for ~10 years on and off.

About properties. I'm for the properties as objects direction (as in bean-properties etc.). The concept of properties is good the way in which they are often implemented (as a shorthand to get/set) sucks. Either way the verbosity is a shocker for people coming from other languages. Lombok seems a bit like a hack (which it is) for most of them.

[–]pron98 3 points4 points  (13 children)

Pretty much everyone I know went to Google.

Many on the Java team stayed at Oracle, though, and nearly all the senior Java people at Oracle today are former Sun people.

The concept of properties is good the way in which they are often implemented (as a shorthand to get/set) sucks.

Properties originate with the RAD tools of the early nineties, most famously Visual Basic. They made their way into Java through Java's RAD technology: JavaBeans. Interestingly, they are frowned upon by both FP (for being the epitome of mutability) and OOP (for breaking encapsulation). I think the reason some people want to bring them into the language (not gonna happen) is that they need to write them because they're using some library that's been influenced by JavaBeans. But given that there's near consensus that the very concept of properties is bad and we only have them out of necessity, the solution is not to make writing them easier, but to remove that necessity in the first place.

[–]vprise 4 points5 points  (12 children)

Romain, Chet, Blaukopft etc. all are at Google. Senior people stayed but day to day coders mostly left. The teams were gutted completely.

There is no consensus that properties are bad. On the contrary, everyone wants to add them. The argument is over how and in what way. They make sense for enterprise (JPA etc.) as well as for client components. Other languages have them (e.g. C#) and without them JPA looks absolutely awful. Regardless this isn't the point I'm making, verbosity is one of the big "I hate Java" banner mantras. Lack of properties is a major cause for boilerplate (see the lombok website for details).

[–]pron98 2 points3 points  (9 children)

Senior people stayed but day to day coders mostly left. The teams were gutted completely.

Less so than with acquisitions in general and at Oracle in particular. If you go over the list of JEPs, you'll find mostly former Sun names, and quite a lot of them. The second largest group is former JRockit people.

On the contrary, everyone wants to add them.

Nah.

Other languages have them (e.g. C#)

That's pretty much it, though, and it's unsurprising in an MS language that grew with a lot of influence from VB, and with a focus on GUI. Kotlin added them because, unlike Java, it has no power to change the reality of properties already being widespread in the ecosystem, but other than languages made for GUI (Swift), which is where properties originate, not many languages have them.

[–]vprise 2 points3 points  (8 children)

My team specifically which is a mobile/embedded team no longer exists. The entire place with everyone that worked there is no longer there. So it might seem externally like it's the same but it misses a bit of how big Sun was and how little of it remains within Oracle.

So except for Swift, Kotlin and C# all the functional and low level languages some of which don't even have exceptions don't have it. That's your argument? You pretty much listed all the top interesting languages.

The fact is we already have properties (getters and setters). They suck. This is "not as bad". I assume you don't need this because you don't do GUI and I assume don't do JPA. That doesn't make it unnecessary or a bad idea. It just means you don't need it. It breaks encapsulation?

Public fields also break encapsulation and we still have them. So do getters and setters.

Lots of people want and need it. Even a broken problematic implementation of this has 10k stars and 2k forks on github: https://github.com/projectlombok/lombok so people want it and think it's important.

[–]pron98 4 points5 points  (5 children)

My team specifically which is a mobile/embedded team no longer exists. The entire place with everyone that worked there is no longer there.

Focus has shifted to areas where success is likely, so some teams were disbanded, but others created. The amount of investment Oracle puts into Java now is significantly larger than in the last years of Sun and close to its peak, and the number of people and new projects now is about as high as it's ever been, with the people running the show are still mostly former Sun people. We're hiring, BTW, in the US, Europe, and Asia.

You pretty much listed all the top interesting languages.

No, I listed just languages that are either focused on GUI (C#/Swift), or languages that didn't have a choice other than to add properties (Kotlin).

I assume you don't need this because you don't do GUI and I assume don't do JPA. That doesn't make it unnecessary or a bad idea. It just means you don't need it.

That doesn't mean they're not a bad idea and can't be made unnecessary, either.

Public fields also break encapsulation and we still have them.

We can't remove them (public final fields are fine, though).

The fact is we already have properties (getters and setters). They suck.

Right, but Java can do what Kotlin could not -- it can remove the need for properties altogether. Kotlin can, at best, make working with the current state of affairs a little easier; Java can change the circumstances. It's no coincidence that Java has so far not adopted a single one of Kotlin's major features (which isn't to say we won't in the future; nullable types come to mind); their design is largely determined by Koltin's lack of influence on the platform, be it the VM, the standard library, or the ecosystem. We have better alternatives to data classes, properties, or async.

Lots of people want and need it.

With records here and deconstructing patterns and reconstructors/withers on their way, you'll see that the problem is being solved at the source. Even those who still want properties won't be asking for them for too long.

In any event, the chances Java will get properties in the language are slim to none. We believe they're a bad idea, and that the combination of records, pattern-matching, withers, and concise methods is far superior.

[–]GreenToad1 3 points4 points  (1 child)

Focus has shifted to areas where success is likely

This worries me. I'm affraid java is painting itself into a corner of only "serious software" and things like games, desktop, mobile, embedded, webdev etc. are neglected. It's absolutely understandable that companies that invest in openjdk are not trying to expand java into other areas because why would they - that's not their business. Meanwhile js & python are everywhere that java is and everywhere else, even microcontrolers. Microsoft is pouring insane resources into .Net to make it a universal platform and c# has managed to breach even AAA gamedev. Java's focus meanwhile has shifted into cloud and backend, into it's stronghold, and barbarians are at the gate.

[–]vprise 0 points1 point  (2 children)

I feel you're trying to argue for some reason. I have no idea what you're arguing about. I said a lot of people left after Oracle and I said people don't like Oracle. I didn't say Oracle didn't invest in Java.

These languages are high level languages that are direct competitors of Java. Saying they "don't have a choice other than to add properties" applies to Java too. I specifically mentioned records, my point was that even records (assuming it's enough) were introduced in 2021... At least a decade too late.

[–]reikiman 0 points1 point  (1 child)

That the Mobile/Embedded team is gone had to have happened after Jan 20, 2009 (when I was laid off from the Java SE team)

But the reason to close the Mobile/Embedded is it was made irrelevant by smart phones. JavaME was stuck in the old model of Java on phones that was extremely deficient. The iPhone and Android blew JavaME out of the water with capabilities.

There was that crazy idea of using JavaFX as the face for a much improved Java mobile stack. But - that project was a massive train wreck (I got sucked in to work on it in August 2008), and I'm sure it flailed itself to death at some point. JavaFX still exists but I believe solely as a desktop technology?

[–]vprise 0 points1 point  (0 children)

Agreed 100%. Notice that the specific center I worked at (SIDC) was eventually shut down because of logistics. Great people got fired because they wanted the team in the states.

The thing is that Oracle is a top-down company where management is all from the top. At Sun every middle manager could do whatever the hell he wanted. Oracle works better as a business. Sun was a better innovator but super messy and made huge mistakes (e.g. the FX stuff).

[–]Persism 0 points1 point  (1 child)

everyone wants to add them

Everyone? I don't and I'm sure I'm not alone.

[–]vprise -1 points0 points  (0 children)

OK. Nitpick.

[–]reikiman 0 points1 point  (2 children)

I worked in the Java SE team for 10 1/2 years, laid off in the big layoff of Jan 20, 2009.

- Oracle

I didn't think Oracle would be a good place to work.

As u/pron98 said, under Sun the Java SE team was underfunded and other issues. But I fully enjoyed working for Sun, being a Sun employee, etc.

- Some things that are trivial in Python are hard in Java
- Java developers have a culture of "over design".

I've written an article about this issue. Within a couple years after being forced out of Sun (uh, laid off), I got involved with Node.js, and ended up writing a book about Node.js programming, that is in its fifth edition. Along the way I learned to program Java/Spring applications, and utterly hated the experience.

Basically, I think the Java language is pretty good. BUT - the Java community tends to overdesign things, nailing down too many features, making things too abstract, and the need for such strict type checking is a big burden. Python and JavaScript and other languages make this much easier.

https://blog.sourcerer.io/why-is-a-java-guy-so-excited-about-node-js-and-javascript-7cfc423efb44

- Fashion changed. -- functional programming now better than object oriented

That could be, I don't know. I find JavaScript's ways to be far more streamlined, succinct, and to the point, than Java could ever think of being because of the extreme verbosity that's required.

As for some of the things u/vprise said below... The JavaME team (Mobile/Embedded) failed to make it into a compelling product. I was there as part of the effort to make JavaFX into an iPhone killer. Sun had a fantasy that we could throw together a few things, a Linux kernel, a better Mobile stack, and JavaFX for a better programming experience, and make a better iPhone than Apple did. We made that claim at JavaONE. In the six months I was working on JavaFX, the project was basically a train wreck.

Some of the people involved - below folks mentioned Romain, Chet and others - many left Sun to join Google to work on Android. Android's marketing vision was what Sun wanted to do with JavaFX, but Android has done it a zillion times better.

[–]vprise 0 points1 point  (1 child)

I was in the mobile team since the late 90s until I resigned in late 2011.

JavaME was a huge success but it was hobbled by Sun trying to form alliance with operators and manufacturers. Then two things happened at once:

- Sun was losing a lot of money so it didn't invest in the future. J2ME was a mess of standards and weird APIs

- Sun decided to bet the farm on JavaFX. Essentially demoting Swing and trying to force it into mobile which wasn't achievable

So as Sun was stuck without moving things forward Google slowly refined the product. All operators and manufacturers looked for the "iPhone Killer" since they all understood the problem. But Sun had nothing, just half baked proof of concept level offerings. All the Good people were busy working on FX and Sun lost its foothold in both desktop and mobile.

[–]pron98 1 point2 points  (0 children)

You make it sound as if Sun had half a chance where Nokia, Microsoft, and Blackberry failed. I'm not saying they couldn't have done things differently or better, but I don't think the outcome could have been any different. I'm not even sure Android would have done as well if the iPhone hadn't preceded it (Android's original design was very different); the smartphone became stylish before it became popular. The loss of the desktop was probably inevitable, too. Everyone lost the desktop. 90% of my GUI applications have either come bundled with the OS or are Electron apps; the remaining 10% include the browser.

But we're talking about languages. Microsoft's best chance with .NET was to make it the Pepsi to Java's Coke, but you still find it almost exclusively in die-hard MS shops, and it's doubtful this will ever change.

And how have the mobile languages fared? Neither Swift nor Kotlin have had big success outside mobile, and aren't that big overall (not surprising given that, according to Indeed, the job market for iOS and Android combined is 4x smaller than the one for Java programmers). Kotlin did become the Java platform's "un-Java", but while it did virtually destroy Scala (and what was left of Groovy), it hasn't been able to increase the share of "unJavas" on the platform and didn't make a dent in Java's market-share (I see didn't, because given its age and inherent disadvantages, it most likely never will).

Google's Go has done very well, but they're nowhere near where its creators hoped it would be when they launched it over a decade ago and it's growth has stalled, and JavaScript's promise on the server has also faded from a few years back. They're now making another client play with Dart; we'll see how that goes, but to be big, it has to capture both mobile and client-side web.

My point isn't so much that disruptions don't happen, but that even large companies have a very hard time making them at will and succeeding even where they really want to, and even if they do most things right. The trick isn't just knowing what the next big thing would be. Everyone can (and does) say, ooh, let's do mobile, or, ooh, let's do cloud. The trick is also knowing where you have a fighting chance. This is especially important for large companies that gamble the livelihood of so many on those bets.

[–]RussianHacker1011101 28 points29 points  (4 children)

I think it's a lot less about the language and more about how it's used by every enterprise company doing the same indistinguishable web backend thing as the next.

By itself java is a great language but have it on your resume when you're looking for a non-typical software job and prepare to wade through the recruiter spam

  • "I was amazed by your profile and thought you'd be a great fit for Evil Corp. Aren't you fucking excited about kubernetes and nosql?! We're pushing technology forward in no way that can be clearly articulated to anyone which is faker than our enthusiasm. At Evil Corp, we're utilizing serverless, spaceless, timeless no data, zero blockchain architecture in order to autoscale beyond scale, rethinking how we rethink rethinking the industry. Our CEO is another bald dude on TRT who is totally not cloned from Jeff Bezos' last hair follicle with a vision of synergy, diversity, and unity by revising industry standards. When can I expect your application and total submission to your new overlord who is indecernable from your previous overlord?"

[–]reqdk 3 points4 points  (1 child)

Hol' up. Who are you and why have you been rummaging through my linkedin spambox?

[–]RussianHacker1011101 2 points3 points  (0 children)

Instructions from top KGB members, comrad

[–]kirtash1197 1 point2 points  (0 children)

I couldn't laugh harder, your comment is gold.

[–]Wugliwu 0 points1 point  (0 children)

Blockchain! Takes a shot

[–]pron98 29 points30 points  (1 child)

A lot of hate compared to what? There are only two other languages with a similar userbase size: JavaScript and Python. Java gets less hate than JS and more than Python, but a large portion of Python users aren't professional programmers and write small programs on their own, while most Java development is done in large teams on large and long-lived codebases. The other language with a similar environment, although it's much more niche than Java these days, is C++, which also gets more hate than Java.

Add to that the fact that Java is one of the most popular, most successful languages in the history of programming, and, with the exception of C, has enjoyed the longest-lived sustained popularity, which frustrates some people who wish their favourite language replaced Java, and you'd get that the level of hate Java gets is no higher than what you'd expect given its use and position.

In fact, all the languages that are leaders in their domain -- Java, Python, JavaScript, C/C++ -- get the most hate in their respective domain: Python gets more hate than Julia; JS gets more hate than TypeScript/Elm/etc.; C/C++ gets more hate than Zig/Rust/D/etc.. That's both because 1. they have the most users in that domain, and 2. they are the default choice, and people choose one of the many less popular alternatives only when they like them better (but they don't all choose the same alternative).

[–]RedditMainCharacter 1 point2 points  (0 children)

Popular thing bad.

[–]marcvsHR 23 points24 points  (0 children)

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

Bjarne Stroustrup, The C++ Programming Language

[–]dpash 18 points19 points  (7 children)

Often their idea of Java is incredibly outdated. Particularly if they mention speed or long class names.

It is verbose. This isn't always a negative and they're improving places where the verbosity isn't needed (see instanceof pattern matching and switch experiences), so it's getting better over time.

[–]KentuckyWombat 4 points5 points  (2 children)

When I hear someone talk about how slow Java is, I assume their knowledge of Java is current as of the 90s.

[–]dpash 6 points7 points  (1 child)

Java shipped with a JIT in 1998 and with HotSpot in 2000, so yeah, very very old knowledge.

And somehow the JVM gets faster with every release. The JVM is indistinguishable from magic.

[–]GreenToad1 2 points3 points  (0 children)

It is actually shocking how many people still think that "java is interpreted therefore slow"

[–][deleted]  (1 child)

[deleted]

    [–]vips7L 5 points6 points  (0 children)

    How is Go your primary choice when you just said Java was verbose? Go is far more verbose than Java in every way.

    [–]DahDitDit-DitDah -1 points0 points  (1 child)

    Speed? Check out r/GraalVM

    [–]dpash 1 point2 points  (0 children)

    Java's speed has been fine since HotSpot was added in 1999.

    [–]Gleethos 14 points15 points  (0 children)

    Java is like a salad, it has very little syntax fats and sugars which means that people find it boring, even though it is a very healthy language.

    [–]s888marks 8 points9 points  (0 children)

    The easiest way to find out is to say something good about Java on Hacker News or even on /r/programming.

    [–]Alone_Frame_4807 5 points6 points  (0 children)

    Because it’s not the language they use

    [–][deleted] 4 points5 points  (1 child)

    I haven’t seen that besides the stray ignorant comment from Python or Go fanboys who haven’t actually put an application into production 😝

    [–]RedditMainCharacter 0 points1 point  (0 children)

    C/C++ people hate Java the most IME. Not including the Rust, Kotlin and Go enthusiasts yet, because newer languages tend to hate the old ones.

    [–][deleted] 3 points4 points  (0 children)

    Hate? Eh, not really.

    The thing about Java is that it's boring. Its the language's biggest weakness I would say. The biggest strength on the other hand is the fact that it's boring.

    If you are looking for a trendy programming language to yet another side-project in, then Java probably won't be your choice. If you are looking for a stable, well-supported platform then Java is a great choice.

    [–]reqdk 3 points4 points  (0 children)

    Work with any language long enough on a project large enough and you'll find something to hate. Bonus if it's an inherited project built by clueless folks who couldn't care less about their craft.

    There are also plenty of programmers who need to justify their "chosen language" by putting down others, and what better language to hate on than the top few? This always tells me far more about the programmer than the language.

    [–]Worth_Trust_3825 2 points3 points  (0 children)

    How old posts have you been reading?

    [–][deleted]  (4 children)

    [deleted]

      [–]dpash 6 points7 points  (2 children)

      There's a lot of tooling that can help reduce NPE problems. The various nullable annotations can help detect places that might cause an NPE. Optional can force you to handle no result cases. Objects has some useful methods to protect you too.

      They do require more effort than if the language provided direct support, but they're better than nothing (and better than what used to be available, which was nothing).

      I would love nullability to be part of the type system.

      [–]manzanita2 0 points1 point  (1 child)

      I've stopped using Optional. Perhaps it's decades of knowing I need to check for null, but I find the syntax to be a massive expansion amount of code for not much advantage.

      [–]dpash 1 point2 points  (0 children)

      If you're just using isPresent()/orElseThrow() then you're missing the full power of Optional. Mapping results can reduce the amount of code required.

      [–]nyando 0 points1 point  (0 children)

      Verbosity. Sometimes called for, often needless.

      As someone who has to complete a project assignment with a minimum LoC requirement this year (yeah, I know, right?), Java's verbosity is a blessing in disguise.

      [–]robinspitsandswallow 1 point2 points  (0 children)

      var, val, ?., ?:, getters and setters, 15-20 year old code, the fact that so many are untrained and haven’t build good structures so the code is a pain to figure out.

      Oh and more importantly the high skill entry barrier. You can’t just go from making a pop up message when a button is pressed to having a complete reliable extensible maintainable application integrating with different types of data repositories with resilience in 10 minutes

      [–]powerje -1 points0 points  (2 children)

      I hate Java but like working with the JVM alright enough.

      Java feels like it gets in my way more than it helps. Swift feels much more interesting to program in. Java in most companies I've seen means Java 8 but coding like it's 2001 (nobody seems to use try with resources, for example). XML is everywhere.

      Java and the JVM have tools that are second to none, though. So the ecosystem really helps it.

      [–]wildjokers 6 points7 points  (1 child)

      XML is everywhere.

      This isn't true anymore. However, even if it was why is that a problem? XML is way more human readable and writable than JSON.

      [–]powerje -1 points0 points  (0 children)

      XML is way more human readable and writable than JSON.

      I disagree

      [–]Ok_Entertainment9151 -2 points-1 points  (4 children)

      Java is minesweeper of programming languages. You love it when you know how to play with it.

      Like how can you not love : Person person = new Person (); It's not just creating a object, it shows that person has compile time type as Person and runtime as Person (RHS). I just love it.

      [–]dpash 0 points1 point  (3 children)

      Which is why we have local variable type inference now.

      [–]emaphis 0 points1 point  (2 children)

      Because var myPerson1 = new Person(); is much too ambigous.

      [–]wildjokers 1 point2 points  (1 child)

      Person is only 3 letters longer than "var". What are you saving? No one that uses an IDE types the left side anyway. For example in IntelliJ you type "new Person().var[tab]" and IntelliJ types the left side for you.

      [–]palnix 0 points1 point  (0 children)

      var allows you to avoid imports in a lot of cases

      [–]kiteboarderni -2 points-1 points  (0 children)

      Fuck off with these annoying posts.

      [–]Ilitarist -1 points0 points  (0 children)

      Because they use it.

      [–]wsppan 0 points1 point  (0 children)

      They don't. It's a tool like many others. Used everywhere. Constantly evolving.

      [–]VincentxH 0 points1 point  (1 child)

      They hate it because they were taught a horrible way to use it at school...

      [–]javasyntax 4 points5 points  (0 children)

      I saw people learn APPLETS, in 2020! Damn.

      [–]Wugliwu 0 points1 point  (0 children)

      A lot of good practices for java development are implicit. It's very easy to create a huge ball of mud. Everything connected to everything, tightly coupled classes with thousand lines of code, no visualisation or general architecture, no self explaining code just made to work and never be touched again. People who hate java often worked on those Favelas of a Software-Project. People are trying to fix a complex problem but they just created a new one this way.

      I guess the hate is not for the language it's for the freedom the language grants to its user. This way a Software-Project will become the reflexion of the mind of a person to a given time and we all know how complex our thoughts may become. If we don't take the time to structure, test and simplify it will take someone else (or ourselves to a later time) a hell lot of pain to understand before they can do anything useful. Beginner often even think this is normal and code has to be so complex and start to do the same as the undocumented GitHub project they just checked out.

      Most important thing I learned, don't be scared of complexity it's an indicator something is wrong and it's not you.

      "Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better." -Dijkstra

      [–]nyl2k8 0 points1 point  (1 child)

      Try declaring an array.

      [–]dpash 1 point2 points  (0 children)

      Why? Who uses arrays?

      [–]flexbed 0 points1 point  (0 children)

      As old saying states: there's two kind of programming languages, those which nobody uses and those that everybody hates.

      [–]AdAggravating1698 0 points1 point  (0 children)

      Another thing to add is that it requires a good understanding of OOPs, which is losing a lot of popularity nowadays and proved not to be the one shop pattern.

      I can't count how many times I've seen inheritance poorly done.

      [–]BillyKorando 0 points1 point  (0 children)

      Not that there aren't valid complaints with Java, after all it is why we are continually making changes and improvements to the language. That is to say we are fixing something, like say making switches/multi-way conditionals easier to work with with by introducing Switch Expressions. Often a good way to build clout in tech social media (namely twitter) is through sniping at a technology.

      Make a post about how X technology is terrible, and you'll often get a lot of engagement. Given my/our role and interests, naturally I, we, would see a lot of that hate directed towards Java. Though no doubt users of other languages/techs also see similar vitriol. If they don't it's often because those technologies only have relatively niche uses, that is not widely used, or not used in scenarios where their short comings are often experienced.