r/programming • • Feb 22 '15

Java Makes Programmers Want To Do Absolutely Anything Else With Their Time

http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35 Upvotes

636 comments sorted by

View all comments

21

u/nickguletskii200 Feb 22 '15 edited Feb 22 '15

What a shitty article.

Please find me a language that has:

  1. Comparable tooling

  2. A set of 3rd party libraries as rich as Java's

  3. Non-retarded standard library

This article doesn't even use modern Java... This:

HashMap<String, Set> depMap = new HashMap();

Should be written like this:

Map<String, Set> depMap = new HashMap<>();

I can't fucking understand what the author is suggesting. C and C++ absolutely can't be used where Java is used. OCaml has a rather small community. Haskell is just too hard to work with for most projects: it becomes a restriction, not a tool.

Edit: fixed code example, thanks /u/TomRK1089!

4

u/yogthos Feb 22 '15

Take a look around on the JVM. You have Clojure and Scala which are both very nice languages. They get the benefits of the exact same tooling and libraries. On top of that you get some nice tooling you don't get in Java. For example, Clojure allows doing REPL driven development and IDEs provide structural code editing. The JVM is a great platform, but there are very few compelling reasons to use Java the language today.

3

u/nickguletskii200 Feb 22 '15

I've used both Clojure and Scala, and I want to try Groovy next (although I'll wait a bit and see if it dies out since Pivotal is no longer behind it).

Clojure gave me a very bad first impression. I liked the language, but the implementation is horrible. Doing something incorrectly results in the compiler throwing exceptions instead of showing what in the code caused the problem. Documentation on some of the more advanced language features was scarce at the time.

Scala has different problems. Or at least it had the last time I used it (I doubt the situation improved though). Compilation is slow, IDEs are mindbogglingly slow and unstable and the language seems to love abusing operator overloading for everything. Oh, and I still don't understand why they chose Pascal-style syntax for variables, parameters, etc...

2

u/yogthos Feb 22 '15

Clojure gave me a very bad first impression. I liked the language, but the implementation is horrible. Doing something incorrectly results in the compiler throwing exceptions instead of showing what in the code caused the problem.

I've been using Clojure professionally for the past 4 years and I can definitively tell you there's nothing wrong with its implementation. The error messages certainly could be better, but figuring them out is not all that difficult once you learn what the errors mean. My experience has been that errors do trace precisely where the problem occurred vast majority of the time. In fact I've practically never had a reason to use a debugger when working with Clojure, something that I relied on constantly with Java.

I also find that the REPL completely eliminates the whole compile/run cycle. I can see what the functions are doing as I'm writing them and I don't have to compile and run the whole application any time I make a change. This means that I'm not building up a lot of code before I'm testing to see whether it does what I want. This keeps the context that I need to keep in my head at any one time very small.

I don't know when you last tried Clojure, but there's a lot of documentation available today and there are a number of great books discussing its advanced features.

Not being a Scala user myself I can't really say what the situation is like there. Lots of companies appear to be using it happily though, so can't be all bad. :)

→ More replies (12)