At this point it's worth looking briefly at what is required to implement something more "serious" without a lot of excessive pain. It's really quite easy:
It's been a long time, and but I finally have a little bit of time again, and it's time to continue.
At this point the next step is some re-factoring. As it stands the compiler is very tightly tied to x86, and before it gets bigger it's worth starting to redress ...
Uh, yeah. So much for posting the next part in a few days. I think I'll stop trying to second guess when I'll next have time (but sine I'm going off to Norway for vacation for a week, it's a safe bet the next part won't show up until later than ...
As we've seen, 'while' can be implemented fairly easily in terms of a quite basic language. We could streamline it even more by reducing the verbiage needed to pass anonymous functions or by adding a Lisp style macro facility, but there are complications, so I'm biting the bullet and adding a built in "while" construct for now.
Last time we looked at an improved way of handling loops etc. using anonymous functions. But most of that is relatively limited if there's no way of modifying variables. Sure, you can get away with recursion and not allow mutation or even other side effects at all. It might satisfy some ...
I've combined two of the planned parts this time, what was in the list from last time as parts 7 and 8.
We can implement loops using recursion "manually", but adding lambda's now should make it possible to create a slightly cleaner version by actually ...
Since we established last time that I'm going to blatantly steal stuff from Lisp, Scheme and friends (as well as from all over the place - I feel no need to be original with this project... Not until we're much further along, anyway), now is the right time to start introducing ...
Last time I promised to post these more frequently, and blatantly failed to find the time... In return, I've taken the time to combine what would have been parts 5, 6 and 7, that by themselves would've been annoyingly short. Here goes:
So far our program have only ...
Sorry for the long delay since the last part, I've simply been too caught up in other stuff. As the list from last time indicated, this part will cover defining functions and adding support for building a simple "runtime library".
A programming language without either functions or methods isn't ...