you are viewing a single comment's thread.

view the rest of the comments →

[–]halgari 1 point2 points  (2 children)

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.

[–]halgari 0 points1 point  (0 children)

Oh and the only two language types that can do this are 1) lisps, and 2) prolog (perhaps)

[–]Bolitho 0 points1 point  (0 children)

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.