Hacker News new | ask | show | jobs
by QuantumGuy 4936 days ago
If Java is a terrible language and horribly designed then why do people still use it?
6 comments

Java isn't a horrible language it's a somewhat mediocre language.

It's a lowest common denominator.

It has a couple of very good free cross-platform ide's.

It's write once -run everywhere to a certain extent. While java gui's may be a bit ugly they let you run self contained apps with no dependencies except for the jvm(installed on more the 1/2 of all pcs).

The vm (at least the main sun/oracle hotspot / openjdk) has a world class jit and gc.

Speaking purely from the server-side of things, Java (the ecosystem) has great libraries and frameworks for webapps and middleware. It also has OSGi, which solves a unique set of problems that aren't addressed by any other language ecosystem that I know of.

This is all in spite of Java the language, which is kind of a lame duck. Java 8 should improve things if it ever gets released.

Every single thing that the other people have replied plus 2 things:

1) Tons of experienced and battle-tested people in the ecosystems

2) Standards that keep improving

It's a dual-edge sword thingie, on one hand standards are good for stability but bad because sometimes it slow innovation down. Having said that, the Java ecosystems typically have one strong alternative outside the standard so your choices, in most cases, come down to 2: use what comes from SUN/Oracle or use the leading open source alternative solution. Simple.

Because it really isn't. I think that most Java haters are very young web developers with but a few years of experience. Having said that, there are quite a few languages that are much more productive than Java, and are a better fit for, say, run-of-the-mill web development. But very few languages can beat Java's performance and tooling (especially when it comes to runtime monitoring and profiling). More productive JVM languages make the best of both worlds, though.
Modern HotSpot is probably one of the best VMs out there; while you could certainly argue that the language isn't wonderful, the VM is superb, and a lot of the tools are excellent.
1) Great built-in library

2) great third party libraries,

3) decent documentation and tons of books and instructional material,

4) best-in-class virtual machine, good GC, as speedy as you get with managed code,

5) tons of profilers and development tools

6) several industry leading tools written in it (Hadoop, Lucene/Solr, Hbase, etc) and for it (IDEA, Eclipse),

7) Enterprise support from big companies (Sun, now Oracle) and IBM, and several smaller ones

8) Keeps improving (closures added in current 8 beta for example)

9) A large ecosystem of interoperating JVM languages, from Ruby/Python like (Groovy) to Haskell like (Scala), to Lisps (Clojure)

10) 15 year history, and at some point it fixed a lot of C++ pain points for enterprise programers

With all of these pluses, it can't be that terrible right? ;)

Java is not anymore terrible than anything else when you remember to use the right tool for the right job. I have developed in Java, libraries (JDK's and third party) are just incredibly good, you will not find the same variety and quality anywhere else, period. The language is verbose and also /insert favorite Java complaints here/. So what? Get over it and use the right tool for the right job. We are programmers, not damsels.

Should be...

9) A large ecosystem of interoperating JVM languages, from Java-like (Kotlin, Ceylon, Fantom), Ruby/Python like (JRuby, Jython, Groovy), to Haskell like (Scala), to Lisps (Clojure).

11) A huge supply of cheap, replaceable programmers.