Scheming, part 5
Posted by kernelbob on November 28, 2008
That’s the big news. Lots of little tweaks and cleanup, but call/cc is the big deal. I’d designed the evaluator to handle call/cc way back when, so it wasn’t a major rewrite. It was just a matter of figuring out exactly what it had to do.
Next I can either implement exceptions (which will improve usability a lot) or implement rest arguments. E.g., you should be able to say this,
(define myproc (a b . rest) ...)
which declares myproc to take two or more arguments. rest will be bound to a list containing all the args after the first two. Of course, the reader doesn’t support dot notation, so maybe I should extend the reader first.
Another thing I want to do is add library support. Right now there’s one big namespace. I want to implement the r6rs library system. But I’m not sure whether that needs to be implemented in C or can be written in Scheme.
And I’ve been looking at macros. I’ve got a very rough idea of how to proceed. I’ve successfully called an expansion routine, written in Scheme, from lambda. The expansion doesn’t do anything useful, but in principle it could.
Unfortunately, I’m not learning Scheme very fast. Because the interpreter is just barely functional, I’m not writing any significant amounts of Scheme code.