What is the specific difference between Clojure 1.8's socket repl and nREPL?
Asked Answered
M

2

11

I've been reading this, but there seems to be no tutorial/doc about the difference between these two or whatnot.

Is socket repl going to replace nrepl?

Midnight answered 15/6, 2016 at 15:54 Comment(0)
D
10

At least not now. clojure.core.server/repl is just a plain old REPL that listens on socket, and spits output through socket as well. I'd rather think this socket repl as a nice and small fix to add REPL over network functionality without (much) code change.

nREPL, on the other hand, has been out for long. It provides way more functionalities, among which middleware is the most prominent one. nREPL enables editors and IDEs to interactively communicate with the JVM, enriching the experience when using the basic REPL.

Dylandylana answered 16/6, 2016 at 2:52 Comment(2)
What can be done with the socket that can't be done with the existing nREPL?Ivory
@Andre None, I'm afraid. It only provides conveniences.Dylandylana
I
3

tldr;

  • Socket repl are just plain old repl, serviced on Socket. It's stream-oriented
  • nREPL is network REPL, while the name is similar with socket repl, they are very different. nREPL is messages-oriented program with server/client architecture.

Long version:

Isomorph answered 22/12, 2017 at 13:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.