4 ms·
I don't hate Lisp but I do agree that in those days limited stack depth was a problem. I don't know if this is an accurate assessment of Lisp but I think of pur
by snorkel 18y ago
I don't hate Lisp but I do agree that in those days limited stack depth was a problem. I don't know if this is an accurate assessment of Lisp but I think of pure Lisp as language where all of the data is stored entirely in the call stack. In other words it's just functions and arguments piled up in a stack. Is that right?
- sketerpot 18y agoYou have to heap-allocate data sometimes, too. There's nothing special about Lisp in this respect. I mean, why wouldn't you have to use a heap?
- dfox 18y agoActually, no. For some reason many people have impression that lisp is "functional language" and so on, but that is not true, and certainly was not true for first practical implementations (practical = really running on some hardware). One could discuss various approaches of implementing LISP, but in the end implementation either do not use stack at all (which is especially useful when you want Scheme-like semantics) or use stack in way that is not too different from C or assembly programs (and when it is different it in most cases means using less stack space). Other thing is that particularly common implementation strategy (at least in various simple and educational implementations) of heap allocation and garbage collection was ignoring the problem and simple allocating heap structures by incrementing some pointer and never reclaiming used memory. Which in the end looks somehow like "using ridiculous amounts of stack space".