Live data from Hacker News

Please stop saying Java sucks

blog.smartbear.com

11–20 of 38 posts

Re: Please stop saying Java sucks

#11
post #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?

This article summarises the differences: https://msdn.microsoft.com/en-us/library/ms836794.aspx

Although it is a little out of date in some areas (for both languages).

C# has been stealing from F# for several versions now, so we get all kinds of nice shorthand for accomplishing sometimes complex operations.

Re: Please stop saying Java sucks

#12
Funny how people get riled up over stuff like this. The article is from 6 years ago and you still hear the same comments like "the _____ sucks but the ____ is fine" (ecosystem|language,types|jvm etc.)

The only way to have a healthy debate about a language is to have context: if you are building an integration between a custom app with a RDBMS that has to send data to an ERP system in XML, and there are specs with interfacing the ERP in Java, C#, C++ are you going to argue that Haskell or Lisp is better?

If you have to put a simple web application together quickly as a working prototype are you going to choose Ruby/Rails, Perl, Java/JSP, etc.? It probably doesn't matter technically but does matter when it comes to the experience of the people building it.

Just debating languages against each other in some sort of "cage match" is sort of ridiculous.

Re: Please stop saying Java sucks

#13
post #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 abo…

Java isn't capable, however, of high levels of abstraction without various surrounding crufts, however. That is why it sucks. It's not simply a matter of "more lines", it's the additional cognitive overhead reading those lines demands, and the tooling required to make it suck less.

Re: Please stop saying Java sucks

#15
post #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 abo…

I can believe that a lot of Java devs are not keeping up, but the kerfuffle around that particular Railsconf keynote is a poor example -- I'm pretty sure lots of cutting-edge machine learning researchers, Haskell developers, and so forth also weren't following the gossip in the technical community around a particular tool set that they don't happen to use.

I've seen communities which start to think they're smarter than everyone else because those other people don't get the insiders' inside jokes. It's usually not a good sign for the community...

Re: Please stop saying Java sucks

#16
I have the feeling that the "Java sucks" outcries are not so loud anymore. Java improved significantly over the last few years, the frameworks are better and more lightweight these days (compare Java EE 7 with J2EE ...). And Java has probably the best tooling available. Plus there are some migration stories of companies moving away from Ruby, Python or other scripting languages.

So, all in all Java is a fine technology and you can use the solid foundation with more convenient and concise languages like Scala and Kotlin.

Re: Please stop saying Java sucks

#17
post #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 abo…

Java isn't capable, however, of high levels of abstraction without various surrounding crufts, however. That is why it sucks. It's not simply a matter of "more lines", it's the additional cognitive overhead reading those lines demands, and the tooling required to make it suck less.

Did you just call jython, jruby, groovy, and all of the other dynamic JVM languages cruft?

Or maybe you don't consider them high levels of abstraction... if that's the case might as well not consider inheritance, interfaces, dynamic proxies, classloaders, and annotations while we're at it.

Re: Please stop saying Java sucks

#18
> AutoCAD is going to be big, Quickbooks is going to be big, FireFox is going to be big

1. you probably aren't writing those. 2. Even if you are, you probably aren't writing them in Java.

The problem is the reason why you have to write so many lines in Java. Annoying checked exceptions, lack of expressiveness, boilerplate.

Strong type checking? great. prevents whole swaths of errors.

> Move code around, change signatures, add a function to an interface, and I know nothing is broken. Python can’t.

True, now how painful is it without the IDE?

> It’s true that in Java you tend to have lots of filler code

right and that sucks. The reason that few lines of code is nice isn't just the chances of bugs occuring. It's also nice because it means that I can pack in logic into a smaller, more readable, space. All that other stuff in java doesn't really do much of anything, it is just there (mandatory javadoc on a method called boolean isFooFrobulated(Foo foo), yay so useful!). It means I have to write it, have to maintain it, have to read through it when looking for a bug.

Consider how many java haters actually like C#. It just adds in better tooling to reduce the amount of stupid boilerplate code you have to write. It adds a nice layer of sugar on top that makes things far more pleasant.

Re: Please stop saying Java sucks

#19

Earlier quoted context omitted.

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.

Making immutable structures in Java truly does suck... this is the most valid complaint that I've heard in a long time about the language.

It would be extremely easy to implement properties as syntactic sugar in the language or via built-in annotations without changing the class file spec at all.

Re: Please stop saying Java sucks

#20
post #17

Earlier quoted context omitted.

Java isn't capable, however, of high levels of abstraction without various surrounding crufts, however. That is why it sucks. It's not simply a matter of "more lines", it's the additional cognitive overhead reading those lines demands, and the tooling required to make it suck less.

Did you just call jython, jruby, groovy, and all of the other dynamic JVM languages cruft? Or maybe you don't consider them high levels of abstraction... if that's the case might as well not consider inheritance, interfaces, dynamic proxies, classloaders, and annotations while we're at it.

I read it as you have to add in a bunch of useless boilerplate to do things like pass in an anonymous class to Collections.sort because of a lack of Lambda's (for a stupidly long time at least).
Post reply on HN