home .. forth .. colorforth mail list archive ..

RE: [colorforth] DOES> How is colorForth different from other For ths?


> -----Message d'origine-----
> De : Jonah Thomas [mailto:j2thomas@xxxxxxxxxx]
> Envoyé : lun. 22 décembre 2003 15:51
> À : colorforth@xxxxxxxxxxxxxxxxxx
> Objet : Re: [colorforth] DOES> How is colorForth different from other
> Forths?
> 
> 
> Frédéric DUBOIS wrote:
> >De : Chuck Moore [mailto:chipchuck@xxxxxxxxxxxxxx]
> 
> >>Trade-offs were different with threaded code. But when 
> >>compiling native
> >>code, fewer syntatical constructs seems better. It's nice 
> to say that
> 
> > Why?
> 
> I can't speak for Chuck, but I can say something.  With threaded code 
> you get a real hardware advantage from DOES> .  It does some magic that 
> you can't do with straight Forth code.  If you try to write DOES> in 
> high-level Forth code that doesn't use DOES> you get something obviously 
> inefficient and clunky.  If it's clunky and inefficient with native 
> code, why do it?
> 

I see. With threaded code fetching token was expensive and DOES> allowed us
to stay on the fast lane ( machi e code). With native code we don't need no
more special constructs for that.

> >>colorForth source has a 1-1 correspondance with object code. 
> >>If several
> >>syntaxes generated the same code, it would be a many-1 
> correspondance.
> 
> > How much do you value this correspondance? Is there some 
> benefits to use it in bytecode implementations for example?
> 
> I'm not clear what Chuck will use in place of DOES> .  There might be 
[...]
> You'll have to find out by experience how many extra words 
> are worth having.
> 
> Best wishes.
> 

You've somewhat lost me. we can do ( ANS syntax again) :
: index r> + ;
: MyArray index [  10 allot ( sic )

 Amicalement,
  Frederic


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com