3 ms·
Strictly, parsing s-expressions shouldn't require the allocation of memory "on-the-fly". At least, not moreso than anything else you will be doing. Now, defun
by taeric 9y ago
Strictly, parsing s-expressions shouldn't require the allocation of memory "on-the-fly". At least, not moreso than anything else you will be doing.
Now, defun/define/etc will require more memory management than people would care to admit to. However, just parsing the s-expression is dead simple. Recursion will make it easier, but I'm actually not sure it is required here. For the most part, just keeping a manual stack of what you're dealing with would be easy enough and won't take much effort.
Again I'll stress, though; that anyone that thinks implementing a lisp is dead easy, is likely overstating how easy it can be done. Easier than you could think. Not guaranteed easier than you think.