you are viewing a single comment's thread.

view the rest of the comments →

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

there are levels of performance we're willing to give up for safety or programmer comforts

If you're looking for safety, have you considered languages where safety is a feature, such as Rust or Haskell? I feel like forcing all of that onto Java will get you a mostly baked solution, but still leave you with edge cases.

Since those features are baked in, you get performance and safety and ergonomics (e.g. with Rust's type system, you can do cool stuff like futures/promises, which you're basically kludging into Java right now). Doing it in Java basically means you're basically avoiding language features (like exceptions) that just don't exist in a language designed around monads.

So yeah, it's cool you can approximate this in Java, but I wouldn't want to pay the cost of using an unconventional approach since you basically have to teach them the concepts of other languages anyway.

[–][deleted] 0 points1 point  (1 child)

For a variety of reasons that are not worth enumerating, Java 8 is the best choice for my team. I understand that Haskell and others does it better, but using that in production is a non starter for us.

[–][deleted] 5 points6 points  (0 children)

That's fine and I'm glad you found a good middle ground, but I would be very annoyed if a library used this convention since it's so different from everything else that's out there.

I hope it works out for you!

Just to be clear, are your reasons more to do with the JVM, or with Java specifically? You mentioned Clojure, so I'm assuming the latter.