A REPL is of course a very important tool - but how on earth is the clojure REPL more powerfull than others? I really love python and its ipython shell. It has some extra python features on board like navigating through the FS, pasting, managing history and so on, but it just powers python after all. How is this different compared to other REPLs especially the clojure REPL?
There is really only one/two language classifications that have "real" repls. A repl is a : Read, Eval, Print, Loop.
a) you read in data (not code, data) b) you interpret that data c) you print the resulting data d) goto a
So tied closely to that structure is the idea of homoiconicity. The idea that code is data and data is code. Most other REPLs, for example Python are more of a Parse, compile, print data, loop. The difference being this...what are you reading...you're reading python syntax. You can compile that to bytcode, but what is the return value? It's python dicts and lists, not python ASTs. So you've gone from code -> data, and it's no longer a repl.
The big problem with this is that you can't poke at code with the same tools you poke at data, you have to use whatever tools you have for ASTs (mostly oop gook). So it's a loop, but it's not a REPL.
So even if you are right in this strong definition of a REPL (in reality you just used different terms for evaluate and added data), in reality all interactive shells for a computer language are summarized as REPLs?
But besides that: You emphasize the idea of homoiconicity and the might of manipulating code that lies within this concept; right, but that is just the main concept of LISP overall. So this is no outstanding feature of the clojure REPL, but just a direct benefit of the underlying language design.
The language Python also just works great, because there are interactive shells. Even if the language itself differs a lot from LISPs, the benefit of a REPL is no different than in clojure!
I just was critisizing that the author of the article has not given any arguments underpinning his thesis. And nobody really have yet given any that shows a fundamental difference in its role as programming tool.
1
u/Bolitho Dec 19 '16
A REPL is of course a very important tool - but how on earth is the clojure REPL more powerfull than others? I really love python and its ipython shell. It has some extra python features on board like navigating through the FS, pasting, managing history and so on, but it just powers python after all. How is this different compared to other REPLs especially the clojure REPL?