RE: [colorforth] Machineforth IFs
- Subject: RE: [colorforth] Machineforth IFs
- From: Fréderic DUBOIS <frederic.dubois@xxxxxxxxxxxxx>
- Date: Fri, 31 Jan 2003 18:19:39 +0100
Thanks I'll meditate that and the material (BTW what are vectored jumps? -
you mean DEFERs :) for the week-end.
> -----Message d'origine-----
> De : Chuck Moore [mailto:chipchuck@xxxxxxxxxxxxxx]
> Envoyé : ven. 31 janvier 2003 17:38
> À : colorforth@xxxxxxxxxxxxxxxxxx
> Objet : Re: [colorforth] Machineforth IFs
>
>
> Machine-Forth if is non-destructive for 2 reasons:
> It seems that only half the ifs want to be
> destructive. ?dup is an
> ugly word.
> The decoding for the drop instruction is already difficult. A
> destructive if would make it more so.
>
> The best strategy for dealing with if is to not use it. I
> think that good
> code has a minimal number of conditionals. Many decisions can
> be made at
> compile time. The vectored jump can replace a decision tree.
>
> But given that you must sometimes use it, I see no
> alternative to sprinkling
> drop around. On the c18, this often costs neither time nor space,
> depending on instruction packing.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com