top | item 23797004

(no title)

oweqruiowe | 5 years ago

Clojure user here, and I often don't know the details behind this, can you explain? When trying to explain the repl it's. easy for folks to say "okay, don't I have that too?" but yea, really the updating of values from your editor into this running application 'universe' seems like it should just work for every language, so what is special about lisp that enables it?

discuss

order

Jtsummers|5 years ago

It's possible to do with probably every language out there, it's just not always as practical. Common Lisp, Erlang, and other languages were (in part) designed around interactivity with the running system. In many ways, at execution time, programs in those languages are actually running on a separate operating system hosted by your main OS. This environment is tailored specifically to monitoring, updating, and extending the running program. Compared to C, which has no such infrastructure baked in. At run time, it is whatever you told it to be at compile time (modulo dynamic libraries that may have been loaded). To manipulate C programs at runtime you have to attach a debugger, which does let you do quite a bit. But you're also stepping outside the C language to do it. Versus Common Lisp, Clojure, Erlang, Elixir, and others which present an interface to the running system that is the same (or very nearly the same) as the language itself, and even permits definition of new functions within that interface (you aren't going to write a C function in a C debugger and load it in place of another C function in your running program).