by iLemming · 6y ago · 0 comments
In Clojure, if you have something like:
(foo [a b] ((c a) b))
you can evaluate every single part of it, you'd get immediate feedback, what is `a`, what is `b` and `c`, the result of `(c a)`, the result of the entire thing, etc. Similar thing in JS would be something like:
let foo = (a, b) => { return c(a)(b); }
It's already more difficult to edit, there's no "structure", it's not easy to evaluate arbitrary pieces without "dancing around", introducing temp variables. Given Clojure code snippet is also data, it can be send over the wire, send directly to the connected REPL instance, etc.
That's what gives Lisp developers a substantial speed of development. When people talk about "what's good about Clojure", they usually say: immutable data-structures, stability, hosted nature - can target JVM, JS, BEAM and CLR, can even have interop with Python and R. But the coolest thing about Clojure and Lisps in general - they provide "true" REPLs.
You can certainly eval parts of a python or ruby program (although indentation-as-block needs some care in python).
In lisp you also need a useful scope (eg: if foo isn't bound "(foo 1 2)" won't be very useful).
Edit: or maybe you responded to the wrong comment?