Fork me on GitHub
Ivan Koz07:01:15

Can somebody explain why do we have two invoke for the functions in an emitted bytecode, and why do we call static function from the instance method?

    public Object invoke(final Object coll) {
        return invokeStatic(coll);


My understanding is that invoke() is the function that implements the IFn interface, and it just calls invokeStatic(). Normal calls call that method, but if you have direct linking on during compilation then functions calling your function will just directly call the static method instead, bypassing the var. This is more performant, but means that you can’t update the definition of your function at the REPL.

Ivan Koz10:01:53

interesting, thank you Colin


thank you both!