Live data from Hacker News

Please stop saying Java sucks

blog.smartbear.com

1–10 of 38 posts

Re: Please stop saying Java sucks

#2
I think when I've heard people saying Java sucks, they mean its type system allows defects that the type system of F# or Scala can prevent. Those reasons given for Java being better than Python or Ruby are also why F# is better than Java.

Re: Please stop saying Java sucks

#4

I think when I've heard people saying Java sucks, they mean its type system allows defects that the type system of F# or Scala can prevent. Those reasons given for Java being better than Python or Ruby are also why F# is better than Java.

It's a lot more than that. For example, it's really annoying to define new types in Java.

Re: Please stop saying Java sucks

#5
Java is fine. It did lag a little behind there for a few years, but the last two Java releases have really pulled things together.

I will say C# is still my preferred language just for quality of life reasons, and I also feel like Java has been largely relegated to either web-backend or enterprise desktops. There is no practical way to deliver a Java application to an consumer now, Java Applets are "dead" and running Java on the desktop is a pain. Minecraft is likely the only reason any non-business user has Java still installed.

But saying Java is "only" good for web-backend stuff is kind of like saying a car is "only" good for driving. That's where the majority of new development currently happens and it has a very bright future. Java on Tomcat delivers that experience just fine (although C# w/MVC is still my poison, again for quality of life stuff).

Re: Please stop saying Java sucks

#6

I think when I've heard people saying Java sucks, they mean its type system allows defects that the type system of F# or Scala can prevent. Those reasons given for Java being better than Python or Ruby are also why F# is better than Java.

It's a lot more than that. For example, it's really annoying to define new types in Java.

Could you be more specific? How is it really annoying to define new types in Java?

Re: Please stop saying Java sucks

#7
Hear, hear! Is Java the right tool for everything? No, but for large code bases, it is miles easier to dive into a codebase, and the tooling is so much better than anything else I've seen that's not Visual Studio (as much as I'm not a MS fan, VS is really nice).

Is Java perfect? No, but it gets a whole lot of things not-wrong. More reasons: https://drew.thecsillags.com/Why-Java/

Re: Please stop saying Java sucks

#8
As a language, Java is just that, a very capable language. The JVM is full of great engineering, and when properly tuned, is a very powerful compile target.

Where things start to suck is what seems to surround Java. Years and years of XML configs, Maven and Ant processes. Devs whom haven't been allowed to read about new advances.... I was at a Java user group about a year ago when Venkat Subramaniam came to speak about functional programming. This was right around the time when DHH made his assertion about unit testing. Venkat made a joke like, "and as we learned this week, we no longer need to test our code". No one got the joke. A room full of at least 200 developers and no one got it... because they probably spend most of their time in a cubicle thinking that these new-fangled technologies will die someday, and we can all go back to writing crap like we did in 1999. (Other fun assertions from that user group had to do with JSON being horrible and XML being a far better format for web communication)

It highlighted the problem for me. While Twitter engineers are doing really cool things with Java, many are mired in these huge monolithic apps that take hours to build and even longer to deploy. And much of this stuff is stored in SVN... with no unit tests. It's the culture. They look at front-end developers with disdain... with their GitHub accounts and Vim/Tmux setups. Java doesn't suck. The culture that has grown around it does.

Re: Please stop saying Java sucks

#9

Earlier quoted context omitted.

It's a lot more than that. For example, it's really annoying to define new types in Java.

Could you be more specific? How is it really annoying to define new types in Java?

You have to manually define its constructor, manually provide getters if you want the value to be immutable, put each class in a separate file (or namespaced inside another class), and if your type has finitely many alternatives you have to set up the whole visitor pattern thing. Compare that with C#'s properties and readonly, Scala's case classes, Swift's enum types.

Re: Please stop saying Java sucks

#10

Java is fine. It did lag a little behind there for a few years, but the last two Java releases have really pulled things together. I will say C# is still my preferred language just for quality of life reasons, and I also feel like Java has been largely relegated to either web-backend or enterprise desktops. There is no practical way to deliver a Java application to an consumer now, Java Applets are "dead" and running…

Could you explain the "quality of life" bit? Are you saying that if you programmed in Java life would be hellish?
Post reply on HN