"I remember a time when I thought only super-humans could implement an interpreter but a naive interpreter like this one is really just a matter of putting one foot in front of the next."
I too thought interpreters were arcane and mystical, until a year or so ago I just tried writing one. Mine was also for Scheme, although I cheated because my implementation language was Common Lisp (I was learning it and wanted a toy project to work on). By the end of a plane flight from the UK to Australia I had a minimal working Scheme, with functions, recursion, lexical scope and closures.
I didn't go on to turn it into a bytecode interpreter or a compiler - I didn't even get tail calls working right - but I'm confident that if I'd wanted to, they would also have turned out not to be as hard as I previously thought. I scratched the itch, and it was easy and fun.
I don't think this pattern is unique to programming, and there's probably a lesson to learn. Something you want to do - but don't because you think it's hard - probably isn't hard, so why not try it?
"I remember a time when I thought only super-humans could implement an interpreter but a naive interpreter like this one is really just a matter of putting one foot in front of the next."
I too thought interpreters were arcane and mystical, until a year or so ago I just tried writing one. Mine was also for Scheme, although I cheated because my implementation language was Common Lisp (I was learning it and wanted a toy project to work on). By the end of a plane flight from the UK to Australia I had a minimal working Scheme, with functions, recursion, lexical scope and closures.
I didn't go on to turn it into a bytecode interpreter or a compiler - I didn't even get tail calls working right - but I'm confident that if I'd wanted to, they would also have turned out not to be as hard as I previously thought. I scratched the itch, and it was easy and fun.
I don't think this pattern is unique to programming, and there's probably a lesson to learn. Something you want to do - but don't because you think it's hard - probably isn't hard, so why not try it?