5 ms·
There are some similar horrors in the source code for Clojure. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/IFn.java https://github.com/
by briancarper 16y ago
There are some similar horrors in the source code for Clojure. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/IFn.java https://github.com/clojure/clojure/blob/master/src/jvm/cloju...
Java is a harsh mistress. This is why dynamic languages on the JVM are nice, so I never have to write code like this myself.
- Psyonic 16y agoI can't be sure, but in the Clojure case it appears to be done for performance reasons. The final definition of invoke uses varargs for everything after 20, so it's not an issue of compatibility.
- jcromartie 16y agoAs long as nobody is maintaining that type of code by hand, I don't care what makes the JVM happy.