4 ms·
I wish it made more things first class. There are surprisingly many restrictions. Example: the call stack isn't first class. You can only interact with it thro
by Blackthorn 5y ago
I wish it made more things first class. There are surprisingly many restrictions.
Example: the call stack isn't first class. You can only interact with it through the condition system, which is very limited.
Example: CLOS has a meta object protocol, which is great! But there's no equivalent to the MOP for, say, the language rules themselves (first element in a list in the reader is treated as a function namespace reference, for example).
- lukego 5y agoI was lamenting this the other day, thinking of Smalltalk being able to snapshot the stack and store it in a variable for debugging later. Then it occurred that one should be able to write a Lisp function that creates a data structure containing a snapshot of the whole stack and then inspect that later. So maybe no new Lisp primitives are needed?
- Blackthorn 5y agoHow would you write such a function? The ways to interact with the call stack in Common Lisp are very, very limited.
- lispm 5y agoThe debugger of a Lisp system is also not exclusively written in the language (operators, ...) described in the Lisp standard. The standard language is largely independent from a runtime. It says nothing about the implementation technology. The Lisp system could be running on a virtual machine (like many Smalltalk systems), it could be a whole-program compiler to C, ... For example in LispWorks it's possible to look at a snapshot of a stack in a Debugger, later.
- taeric 5y agoIn your last point, isn't that the evaluator, not the reader? That said, I'm all for more first class things. I really just meant that common lisp was ahead of the game on number of first class things.