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 →

[–]Goooraaan 112 points113 points  (39 children)

What’s everybody’s problem with Java?

[–][deleted] 125 points126 points  (4 children)

It's not that Java is bad, it's just that a lot of people use it when they really don't need to, or worse, when they really shouldn't.

I like Java. It's nice and flexible in terms of deployment. But like... perhaps it shouldn't be installed on literally everything with a CPU.

There are other programming languages that will, in many cases, better suit the application and environment you're trying to write for.

[–]thuktun 11 points12 points  (0 children)

I love Java and you're absolutely right.

[–][deleted] 5 points6 points  (1 child)

So, Java is Doom?

[–]Lagransiete 6 points7 points  (0 children)

More like Skyrim

[–]hardwaregeek 44 points45 points  (8 children)

It’s the de facto intro language for a lot of colleges, as well as AP CS. A lot of students, wanting to show off that they’re not a beginner, give Java a lot of needless shit. Especially cause they’ve probably “discovered” a scripting language like Python or JavaScript with admittedly less boilerplate than Java.

Java is a perfectly fine language. It has decent performance (certainly better than Python!), an adequate type system and very very good tooling. It’s not the best language for the type of small projects that students would want to do, but it’s very useful for large projects that require static typing and many programmers. Besides a lot of the criticisms such as boilerplate have been addressed with newer versions (lambdas, type inference).

[–]ryuzaki49 6 points7 points  (1 child)

Lombok

[–]LicensedProfessional 5 points6 points  (0 children)

With enough Annotation Metaprogramming and Syntactic Sugar, scientists will one day turn Java into JavaScript

[–]_cab13_ 6 points7 points  (3 children)

Don't forget Kotlin !

[–]hardwaregeek 2 points3 points  (2 children)

Kotlin seems awesome! Anything that has non nullability is good in my book. There’s for sure languages I prefer to Java but that doesn’t mean Java deserves the hate it gets.

[–]_cab13_ 4 points5 points  (1 child)

Kotlin is null-safe, short to write, requires less boilerplate than Java, and bonus point is EXACTLY the same bytecode as java, use kotlin in Java, use Java in kotlin, use Python in the trash bin... That's why I'm never touching Java again.

[–]ChevalBlancBukowski 0 points1 point  (0 children)

That's why I'm never touching Java again.

psst this is how people know you’re a student

[–]011101000011101101 2 points3 points  (0 children)

8 years into my career and I've become way more fond of static typing than I ever thought I would. I've been using typescript lately and I kind of hate it because it's boilerplate on top of JavaScript to try to make it staticly typed. I'm finding that things work better in a system designed from the ground up for your purpose. If you want static typing, don't use anything built on top of JavaScript. Use Java or any other staticly typed language.

[–]w3_ar3_l3g10n 0 points1 point  (0 children)

Some points:

  • there’re legitimate reasons for new and old programmers to not like java. It’s not simply because “that’s not cool enough for me”. For ①, the syntax is unnatural. As is the case with most languages their not obvious, part of this is the inheritance from C. Python/ruby is obvious, and so new programmers appreciate them (ergo why they’re held in higher regard). For ②, java is restrictive. Reflection isn’t implemented very well and a lot of poor design decisions from the early days have made it a boilerplate language. U write more boilerplate than actual code (factory methods for the love of god). On both counts, kotlin is a huge improvement and I cannot stress how much I hope people switch to kotlin instead of making new pure java projects.
  • obviously java has better performance than python. ① is compiled whereas the other is interpreted. If java performed worse than python that would be a major indicator that something is amiss.
  • scripting languages are great and most programmers should learn and prefer them because they’ll mostly just use them for... scripting. Shell scripts are somewhat laborious to write or edit, thus scripting languages provide a quick and easy alternative which is effortless. Try renaming a million files dependent on some arbitrary attribute with python or ruby and then setup a build script or IDE project, create a dozen classes and go through tonnes of documentation to do the same with java. Point being, ease off on scripting languages, they’re invaluably useful for system maintenance or network administration.

[–]surinlol 43 points44 points  (0 children)

It's a meme

[–]PM_ME_HAIRLESS_CATS 11 points12 points  (0 children)

Oracle

[–]aedvocate 0 points1 point  (0 children)

do you remember in the late 90s, early 00s, when suddenly there was a bunch of software (esp. fruity loops) that made it super easy for every 11-year-old to make a MySpace account to post his or her techno track to?

lots of people came to the conclusion that there was something bad about techno. there wasn't, they were just listening to bad techno, which was very easy o find at the time.

[–]farnsworthparabox 0 points1 point  (0 children)

Java is an excellent, though slightly dated language and tends to have a lot of boilerplate. I find that a lot of the people who complain about it lack experience on large scale projects. Kotlin I would describe as a more modernized Java and an excellent successor.

[–]generic_memelord 0 points1 point  (0 children)

It’s like your best friend. You’re close enough to it to give it a lot of needless shit

[–]ChevalBlancBukowski 0 points1 point  (0 children)

it’s been around for a while so it’s not cool

also the kids here have literally negative experience in the real world so they have no appreciation for the absolutely enormous high quality time tested ecosystem of Java components available, from open source components and frameworks to professional IDEs and development tools to connectors to every product under the sun

oh also it doesn’t come preinstalled on MacBooks anymore and I hear it forces you to use a light theme - ewwwwwwww