[net.lang.forth] Forth Editors and Forth

ma168x@sdcc3.UUCP (John Wavrik) (06/26/86)

   There are some very nice editors available in commercial
versions of Forth.  I've been using MMS-Forth by Miller
Microcomputer Services for several years. One of their editors,
called NOTEPAD, is really intended as a simple word processor.
It can, however, easily be adapted as a Forth editor. It is a
full screen editor which will treat several consecutive screens
as a unit, allowing text to be moved from one block to another;
insertions automatically move displaced text to the next block;
etc.
   The normal MMS editor is also a screen editor, but it is more
block oriented. Text can be moved from one block to another, but
insertions can lose text moved off the end. On the other hand,
it is better suited to the incremental edit-test style of Forth.
The editor has search and replace, automatic date stamping, and
other features which suit it particularly for Forth.
   It should be noted that both of these editors are specific-
ally designed for certain computers. They use special features
of the video mapping and are not portable.

   MMS-Forth is available for TRS-80 and IBM computers from
            Miller Microcomputer Services
            61 Lake Shore Road
            Natick, MA   01760

   One explanation for the editors found in many Forth systems
is the desire for portability. MVP-Forth offers the same editor
for all of its computers. A testament to the portability of the
code is that the source code supplied with a CP/M version of
MVP-Forth ran with virtually no changes on a 32-bit Forth system
(Kitt Peak VAX-Forth) on a VAX 11/780. (Kitt Peak Forth has its
own editor, but the MVP editor is the one described in Brodie's
Starting-FORTH which we used as a textbook -- so Kitt Peak Forth
was converted into a Starting-FORTH system).
   Another explanation for the editors found in many Forth
systems is the way in which Forth applications are developed.
Several short definitions are written then compiled and debugged
--- most definitions are a few lines long. Few are as long as
a block. Editors allowing changes of lines within a block are
adequate for this type of programming.
   Kitt Peak VAX-Forth has an unusual editor which is a cross
between a line editor and screen editor. There is also a pro-
vision for a user to employ ANY editor and then to convert the
resulting text file to Forth format by a simple utility. This
approach could be used with any version of Forth. I think,
however, this encourages an approach to Forth which loses many
of its advantages. Perhaps my reservations come from seeing
students trained in Pascal and C use their favorite editor to
write Forth definitions three screens long with conditionals
four levels deep. Their "applications" tend not to work and are
impossible to debug.
   Forth is an unconventional language. It is a sucessful un-
conventional language because many programmers have learned
to exploit its unique nature. The people who have the most
difficulty with the language are those who try to force it into
a mold formed from their experience with other languages. The
complaint about Forth editors, I suspect, comes from people who
would like to write an application in large chunks using the
edit/compile/link/run cycle to which they are accustomed. Forth
is really not any better than any other language if used in this
way.
                                         --John J Wavrik
...ucbvax!sdcsvax!sdcc3!ma168x