3 ms·
Clojure has to do the same thing to interface with Java: https://clojure.github.io/clojure/javadoc/clojure/lang/IFn.html https://clojure.github.io/clojure/javad
by millerm 5y ago
Clojure has to do the same thing to interface with Java: https://clojure.github.io/clojure/javadoc/clojure/lang/IFn.html https://clojure.github.io/clojure/javadoc/clojure/lang/IFn.h...
- pionar 5y agoI don't know that it "has to", as the last overload has variadic arguments. (Caution, I'm not a Java expert). This is likely for JIT performance, with virtual method lookup. C# does the same thing with string.Format - https://docs.microsoft.com/en-us/dotnet/api/system.string.format?view=net-6.0#overloads https://docs.microsoft.com/en-us/dotnet/api/system.string.fo...
- cjaybo 5y agoAre you looking at the "applyTo" method? I'm not seeing a variadic overload of "invoke", but I'm also not a Java or JVM person. I'm wondering if I'm overlooking something.