[comp.lang.forth] What I really like about FORTH

andy@aoa.UUCP (Andy Jankevics) (12/23/89)

We've heard a lot recently about what is unpleasant about FORTH.  I
would like to discuss what it is about FORTH that brings us back, and
what (for some of us) is so seductive about programming in FORTH.  The
object of this posting is to induce people to think about the FORTH
language and environment features they find most essential.  Maybe the
good parts can influence other language developers working on other
development environments. If there are language developers out there
reading this newsgroup, then this is a way for those participating in
comp.lang.forth to add their two cents worth.

Over the years, I have used FORTH for real time control, data reduction,
simulation, and algorithm development.  I have never tried to build a
large application involving teams of programmers using FORTH.  Keeping
these applications in mind, the features I like about FORTH are as
follows:

1) I really like the interactive nature of FORTH; in simplest terms
the ability to invoke a command and have it execute immediately.  Both
LISP and BASIC have this ability.  I have used both languages, but still
I prefer FORTH for many applications.

2) I like the fact that the commands I invoke execute relatively rapidly,
especially when compared to interpreted BASIC or LISP.  This is probably
the source of the preference stated in 1) above.

3) The extensibility of the language is a major plus.  The extensibility
operates at a much deeper level than what is accomplished by writting
subroutines in other languages.  The very syntax of FORTH is malleable.

4) For real time control, I like the ability that FORTH has to grab
complete control of the machine without an intervening operating system.
Granted, this advantage disappears when running FORTH on UNIX or VMS while large
groups of other people are also trying to get work done.

5) I like the ability to modify my source and try it out quickly.  If any
of you out there have modified just a few characters in a tiny C file,
recompiled nearly instantaneously, and waited 5 minutes to relink with
hundreds of library modules, then I think you know what I mean.  It is the
speed of the equivalent edit-compile-link-test cycle that is awesome when
using FORTH.

6) I like debugging FORTH using all of the power of FORTH.  After applying
a function to an array, I often discover that the function didn't work. -:)
Sometimes I need to *plot* the cube root of every fifth element in the array
versus the log of the elements in another array to help me figure out what
happened.  Try doing this with standard high level language debuggers.

Enough said.  I am extremely interested in any other features/advantages
that FORTH is perceived to have.  I hope this will develop into a positive
discussion that balances the negative articles and replies that have become
common on the net.
				Andy

---------------------------------------------------------------------------

marc@noe.UUCP (Marc de Groot) (12/25/89)

In article <1088@aoa.UUCP> andy@aoa (Andy Jankevics) writes:
>We've heard a lot recently about what is unpleasant about FORTH.  I
>would like to discuss what it is about FORTH that brings us back, and
>what (for some of us) is so seductive about programming in FORTH.

In one sentence, I want to program in the language which allows me
to have the most intimate relationship possible with the computer.

LISP is as powerful as Forth, but is not low-level enough.  It also
does not run well enough on hardware I can afford to have in my home.


"LISP is the language of choice for the programmer who wants everything,
and is willing to pay for it."  -Russell Brand

I want:
	- To be able to single-step my code.
	- To be able to treat code as data.
	- To trivially extend the reserved word set.
	- To trivially modify the syntax.
	- To trivially build tools to increase productivity.

>6) I like debugging FORTH using all of the power of FORTH.  After applying
>a function to an array, I often discover that the function didn't work. -:)
>Sometimes I need to *plot* the cube root of every fifth element in the array
>versus the log of the elements in another array to help me figure out what
>happened.  Try doing this with standard high level language debuggers.

I can't say it any better than that.

^M
-- 
Marc de Groot (KG6KF)         |"...few people know what to do with a computer.
Noe Systems, San Francisco    | They decide that running an operating system
UUCP: uunet!hoptoad!noe!marc  | is a substitute for doing productive work."
Internet: marc@kg6kf.AMPR.ORG | -Chuck Moore