Once Upon A Class

Every time you press ENTER at the REPL, a new class is born. In addition, it comes with a new class loader instance exclusively dedicated to loading it. That’s Clojure behind the scenes doing its runtime magic. On the other hand, in a nREPL client like Cider, not one but two class loader instances are produced, and that is a quirk that carries over since its earliest days. I bring you that story as an excuse for dwelling on the subject of class loading. Arcane, maybe, but essential.

Read on.

Great post! I never took the time to appreciate how things work at the REPL.

1 Like