Hacker News new | ask | show | jobs
by anonjon 6056 days ago
I think you are missing my main point. If the java code is faster, and you really need speed, just call the optimized java code.

If you take seriously the rule that most programs spend 90% of their cycles in a limited number of subroutines (and you rewrite those few locations in Java), you should get speed pretty much equivalent to the Java code.

(Of course, in benchmarks this fails, because benchmarks generally measure the places that i might rewrite).

And then you use Clojure for the tricky and error-prone flow control types of jobs. I hate it when people turn this into a 'Clojure vs. Java' debate. It isn't like that.

It is about Clojure and Java. And I think Clojure and Java wins hands down over the Java only approach (at least for a lot of applications).

1 comments

Sorry if I started sounding like I was making this a Java vs. Clojure approach. I wasn't. My original point is that there are no compelling reasons for me to use a language like Clojure over a language like Ruby. Clojure's biggest selling point, having high-level primitives to parallelize with, is meaningless to me because it is so slow, and it's other selling point, increased productivity, doesn't doesn't mean much to me either because I feel like I can be just as productive in Ruby or Python. I can make those my glue languages. I was originally responding to a post by someone asking "Why Clojure over Ruby?"

By the way, I think combining multiple languages on the JVM is a great idea and it was what prompted me to investigate Clojure in the first place.