Hacker News new | ask | show | jobs
by didibus 1580 days ago
> It is hard for Clojure to compete with other tech stacks, primarily because each method call in Clojure goes through Java reflection which is pretty slow.

That's not true. Clojure functions calling each other do not use reflection. It is only when interoping with Java, and trying to call a Java member method of an object that reflection might be used if there are multiple concrete implementation of the method and the compiler can't find the right one at compile time. In which case, you can provide a type hint to tell it which one you want.

1 comments

Additionally, you can use Leiningen's `check` to quickly identify all the places that need hints. It's not something you need to keep in mind while you're working.