Bad nREPL: 10 Things You Hate About nREPL

submited by
Style Pass
2023-03-26 15:30:07

Mar 26, 2023 | • Bozhidar Batsov

Over the years I’ve heard countless complaints about nREPL and its numerous perceived flaws. I dawned me today that it might be a good idea to write this “living”1 article that will try to catalog and address some of them.

I’ll focus mostly on the common complaints in the Clojure community, but I’ll also touch upon some of the broader perceived issues with the nREPL protocol itself.

A lot has been said about the choice of Bencode for encoding data between the client and the server. The format was very primitive they said. JSON is better! EDN is better! X(ML) is better!

Of course, back when this decision was made EDN didn’t even exist and for most editors dealing effectively with JSON was a very tall order. For clients like vim and Emacs it was much easier to write a simple bencode implementation (typically a few hundred lines of code) than to have to create a fast (and correct) JSON parser in VimScript or Emacs Lisp. Admittedly, I struggled for a while to get even the CIDER bencode parser working properly!

Leave a Comment