From: fraveydank at
gmail.com
On Jan 9, 2012, at 4:03 PM, Eric Smith wrote:
dwight elvey wrote:
What a horrible thing to do with Forth but I see
why one might want to do something like that.
If you're referring to token-threading, there are a lot of good reasons for it. Two
of the most obvious:
1) Code density: the tokens for the most common Forth words are a single byte.
2) Portability: the mainframe ROM tokens don't change when the ROMs are revised, so
programs in plug-in ROMs aren't dependent on the addresses of the Forth words in the
mainframe ROM remaining constant. This also applies to cases where one plug-in ROM calls
another.
Both of these, of course, were why Open Firmware's boot code was tokenized Forth
(they called it FCode). In theory, you could boot the same card in a Sun as in a PowerPC
Mac, though I imagine that seldom worked as well as anyone intended; anyone ever tried?
- Dave
Hi Dave
No real complaint against token Forths. I was refering to cluttering Forth
up with such words a 'tAKE THE' and other such filller words to make it seem
more like English.
Of course, English isn't the only natural language but some think it is.
Well writen Forth is like reading sentences, just not in a lanuage one
is used to.
I've recently been play with the source code for the Forth used in
the Canon Cat. I wanted to write a printer driver for HP printers instead
of being restricted to Canon printers.
It uses a token threaded Forth as well. I've competed that and
off plaing with other things.
Dwight