[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Sep 30 13:46:53 1993 
Subject:Threaded Interpretive Languages 
From:scottw (Scott Wheeler) 
Volume-ID:930930.03 

> i was wondering how the operator "bind" appears in 
> forth, i guess its one of those words i have yet to learn about.

#_INCLUDE "disclaimer.ph" ;;; I don't know Postscript (yet!), and I'm not 
                          ;;; a Forth guru

From a cursory reading of the Red Book, bind appears to replace the
string name of an operator by the value of that operator for all
operators in a definition which have already been defined, protecting
the definition from any changes in the operators used and improving
speed. Normal Forth does this for any definition compiled with the
defining " : " word: there is no way of redefining the words used in a
definition (i.e. you *can* change their definitions, but the old
version will be used in any words already using them). You can get the
effect by using an indirection mechanism (like function pointers in
C), but you have to do this explicitly. Definitely a language for
bottom-up programming!

(By the way, has everyone noticed that Sun Sparcs have a large Forth in
the boot ROMs, with graphics and networking? I have a fantasy that
somewhere out there there is a true believer who has never bothered to
boot Unix, but is happy to have the fastest FOrth workstation
around...)

Robin, the CPL you keep mentioning - is it the same as the (unfinished?)
ancestor of BCPL, and are there any books extant on it?

Scott