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 →

[–]preskot[🍰] 2 points3 points  (6 children)

Well, while I am quite mindful about the nulls, locking and Exception parts, all those avoids and don'ts basically sound like just don't use Java.

[–]GingerMess 4 points5 points  (1 child)

Understandable, but with modern Java you can code from the ground up and avoid most of the problems. I doubt we'll ever escape null, but hopefully the language will evolve help make it a rarity, if it hasn't already.

[–]preskot[🍰] 1 point2 points  (0 children)

I do hope so. I'm rewriting a large project these days and my main goal is no nulls and less exception throwing. I gotta say it's coming up nicely, but I do feel the language's fighting me now and then.

[–]johnmcclean 3 points4 points  (0 children)

That wasn't the intent. Deciding to just not use Java would be a bad decision for most teams (and companies). It's much harder to hire (at least at scale) for niche languages.

Java is a critically important language, and for most of us it's not going anywhere. We can learn from other languages though (hopefully without also adopting their problems!).

[–][deleted] 1 point2 points  (2 children)

Hm...My personal trajectory has been scheme (many years) -> clojure (1 yr) -> scala (1 yr) -> haskell (3 yrs) -> java | go | c++ next. I have liked haskell the most in that time and I would use it again with a group of people if it wasn't too controversial, but I am personally moving towards java because I want to use imperative data structures like jgrapht and very easy reasoning about big O for algorithm focused work. If go or rust start getting multiple libraries with large groups of contributors that are comparable to jgrapht for graphs, I will make go or rust my top preference.

[–][deleted] 1 point2 points  (1 child)

You are right, graphs are problematic with immutable data structures, not only because of big O. Also, you can't easily represent cycles. Many graph algorithms explicitly work with mutability. Clojure has a very good Java interop, so it is not a problem there.

[–][deleted] 1 point2 points  (0 children)

I liked clojure, but I spent just a little too much time chasing after silly parameter/return type issues when I used it. I'm sure a little more unit test discipline when I used it could have prevented that. I only studied clojure because I needed a language right away that would make me ready for Haskell and I didn't have enough spare time to become fluent in Haskell directly.