Re[2]: [colorforth] DOES> How is colorForth different from other Forths?
- Subject: Re[2]: [colorforth] DOES> How is colorForth different from other Forths?
- From: Jeff <jma@xxxxxxxxx>
- Date: Sun, 14 Dec 2003 13:36:12 -0700
While the example I gave could be trivially converted to not use DOES,
one thing DOES allows is better extensibility of Forth. For example,
when using structures:
0 constant struct
: field ( n -- n ) dup create , 1+ does @ cells + ;
: end-struct ( n -- ) create , does create @ cells allot ;
This is a very elegant way of extending a language to do more, easier.
CM> Trade-offs were different with threaded code. But when compiling native
CM> code, fewer syntatical constructs seems better. It's nice to say that
CM> colorForth source has a 1-1 correspondance with object code. If several
CM> syntaxes generated the same code, it would be a many-1 correspondance.
This is something I completely agree with. But the removal of DOES
seems to be a step backwards. Sometimes a step back is needed to
take two forward. Perhaps those two forward steps have already been
taken, and I'm just lagging behind. In which case, I'd like to catch
up to the rest of the class :)
Jeff
Sunday, December 14, 2003, 12:13:46 PM, you wrote:
CM> Perhaps I should explain why colorForth doesn't have DOES>. (Of course, I
would spell DOES>> as does , just to simplify the syntax.)
CM> ---------------------------------------------------------------------
CM> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
CM> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
CM> Main web page - http://www.colorforth.com
--
Best regards,
Jeff mailto:jma@xxxxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com