Re: Re: What attributes of a programming language simplify its implementation? RPN? (Anton Ertl)
Wed, 16 Nov 2022 18:12:17 GMT

          From comp.compilers

Related articles
| List of all articles for this month |

From: (Anton Ertl)
Newsgroups: comp.compilers
Date: Wed, 16 Nov 2022 18:12:17 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 22-09-026 22-10-025 <29190_1668508275_63736A72_29190_327_1_22-11-007@comp.compilers> 22-11-009 22-11-013 22-11-015
Injection-Info:; posting-host=""; logging-data="53407"; mail-complaints-to=""
Keywords: design, semantics
Posted-Date: 16 Nov 2022 17:57:31 EST

gah4 <> writes:
>On Tuesday, November 15, 2022 at 1:15:04 PM UTC-8, wrote:
>> Citing its inventor Chuck Moore:
>> "By permitting the program to dynamically modify its control language,
>> we mark a qualitative change in capability. In a sense, our program
>> has evolved into a meta-language which we apply to the application.”
>PostScript is also based on an RPN language interpreter, though I
>am not sure that the above quotes apply in the same way.

IMO it does.

>One that I know about PostScript, and maybe not be true for Forth,
>is the bind operator.

Postscript uses run-time name binding (like Lisp), Forth binds the
names statically. Postscript's bind makes Postscript more Forth-like,
but note that it statically binds only operators (built-ins), names
that are bound to non-operators are still resolved dynamically.

>Before def, which defines a new operator, you can bind, which binds any
>operators inside the new definition to their current value. (I believe it
>also optimizes them to the address of the routine, saving the time for searching
>for the name in a symbol table.)

Yes, it replaces the names that are bound to operators in the
definition with the operators. So there is no name lookup for those
at run-time.

>So we wrote a header with new macros, and which then redefined
>def such that later macros wouldn't override them.
>(I think we always called them macros, not operators, but I am not
>sure by now what the right name is.)


>The Sun boot roms also use Forth, or something Forth-like as the
>built-in control language.

Yes, the base language of Open Firmware is Forth.

- anton
M. Anton Ertl

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.