🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.forth
Article #351

Some major drawbacks of Forth

#351
From: ulf-d
Date: Tue, 24 Jun 1986 23:04
44 lines
2973 bytes
I am myself a kind of Forth fan. I implemented a version of Forth on
a small Swedish micro and during that work I got to understand some
of the major problems with Forth.

First one asks oneself if Forth has an interactive environment or not.
When developing programs you can easily try the just-gonna-see-if-it-works
method. Define a new word, test it, redefine it, forget it all.
But when it comes to editing you have a problem. You don't "decompile"
a definition just like that. You can't "really" replace an old definition.
You are forced to work with a disk-based editor and with "screens".
I tried to construct a prettyprint function that should be able to
recognize BEGIN-UNTIL, IF-ELSE-THEN, BEGIN-WHILE-REPEAT etc. That's hard,
but it can be done. The problem is that all these structures can't be
found in the code, just a bunch of BRANCHs and 0BRANCHs (conditional and
non-conditional jumps).

What to do? If you impose strict rules such that all definitions can be
printed you would probably loose the "freedom of Forth". A solution could
be to define a printing function for every definition (which could be the
same for most words). But this would maybe conflict with another goal:
that of having compact code.

Another odd thing about Forth is the notion of screens. Why screens? In
my own implementation of Forth I used ordinary text files, which could
be produced by some text editor. Screens use up disk space, they are
a problem when transferring programs.


Any comments to my thoughts are welcome.

-------------------------------------------------------------------------
Ulf Dahle'n     Dept of Computer Science, University of Linkoping, Sweden
                email:  ... enea!liuida!obelix!ulf-d
                        or  ulf-d@obelix.UUCP
                 mail:  Bjornkarrsgatan 15A:22, S-58248 LINKOPING, SWEDEN
                phone:  46 13 176291 or 46 13 171903 or 46 431 72604

"The beginning is a very delicate time. Know then that it is the year
10191... In this time the most precious substance in the universe is the
spice Melange. The Spice extends life. The Spice expands consciousness.
The Spice is vital to space travel... Oh yes, I forgot to tell you: the
Spice exists on only one planet in the entire universe... The planet is
Arrakis, also known as Dune."
-------------------------------------------------------------------------
Technical Details
Message-ID: <142@obelix.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!mcvax!enea!liuida!obelix!ulf-d

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!mcvax!enea!liuida!obelix!ulf-d
From: ulf-d@obelix.UUCP
Newsgroups: net.lang.forth
Subject: Some major drawbacks of Forth
Message-ID: <142@obelix.UUCP>
Date: Tue, 24-Jun-86 19:04:35 EDT
Article-I.D.: obelix.142
Posted: Tue Jun 24 19:04:35 1986
Date-Received: Sat, 28-Jun-86 05:12:54 EDT
Reply-To: ulf-d@obelix.UUCP (Ulf Dahle'n)
Organization: Dept of CS, University of Linkoping, Sweden
Lines: 44