4 ms·
What Lisp and Smalltalk have that still sets them apart is that the language runtime is designed to provide comprehensive support for livecoding. Take, for exa
by mikelevins 4y ago
What Lisp and Smalltalk have that still sets them apart is that the language runtime is designed to provide comprehensive support for livecoding.
Take, for example, Common Lisp's UPDATE-INSTANCE-FOR-REDEFINED-CLASS (http://clhs.lisp.se/Body/f_upda_1.htm http://clhs.lisp.se/Body/f_upda_1.htm). If you redefine a class in a running program, Lisp notices and the next time control touches an existing instance of the class, UPDATE-INSTANCE-FOR-REDEFINED-CLASS is automatically called to reinitialize the instance to reflect the new definition.
That's not all there is to it, of course. For example, how does Lisp know how to reinitialize the instances for the new definition? The Common Lisp standard also defines a complete suite of features to answer that question.
Smalltalk provides equivalent features.
Lots of languages have repls. Some of them support hot reloading. These are not the same kind of thing as automatically noticing that a definition has changed, and that implies that any time you touch a previously-created instance of that definition the runtime needs to automatically catch it and provide facilities (interactive when needed) to dynamically fix up the data to conform to the new definition.
Why would any language define such features? To support a specific style of programming, one in which the program is already running, it just doesn't have all the features you want it to have--so you tell it how to add them, while it runs, and test each new feature immediately, as soon as you've told the program how to do it.
Very few languages support the comprehensive whole-system approach to livecoding that Common Lisp and Smalltalk do. These are not new features, though; they've been around for decades.