News for hackers. Stuff that matters.
Re:Why Clojure doesn't need invokedynamic by swannodette on Friday August 26, 2011 @11:57AM (#2928858)
In a big real world Clojure program you would probably control the amount of interop, or abstract it away. Lots of type hints is not indicative of a well-written Clojure program of any size, a good example of how this can be done over JDK 7 ForkJoin, https://gist.github.com/888733#file_forkjoin.clj. Note the code at the bottom has no type hints yet will be nearly as fast as if you littered code with such noise - this is because of the lovely thing that is JVM inlining.
Re:Why Clojure doesn't need invokedynamic by guard-of-terra on Friday August 26, 2011 @12:13PM (#2928900)
This is in the case when the program is pure-clojure.

In my case, I'm trying to bring some Clojure into an existing project with a sizable Java codebase.

Anyway, I think that your clojure code would use String. Or joda's DateTime and zillion other brilliantly useful classes. It's not practical to either wrap or rewrite all the Java richness.

Concerning your example: Clojure also does a good work of inferring types given a few type hints, and that I good use. Just a few hints, a great speed up.

Re:Why Clojure doesn't need invokedynamic by swannodette on Friday August 26, 2011 @12:18PM (#2928922)
We can agree to disagree. You have clojure.string. For Joda DateTime you have clj-time. There are a growing number of Clojure libraries that provide an idiomatic interface to Java functionality w/o resorting to pervasive type-hinting.