FORTH, the heat is on (sorry Don Henley) [long]

chet at rice.arpa chet at rice.arpa
Thu Jan 23 08:42:52 AEST 1986


I agree with the supporters of FORTH that it is a usable language, and that
with some discipline, a programmer can turn out good FORTH code.  However,
there IS indeed one area in which FORTH is much weaker than any other
language, and this is the area of net-effect.  A FORTH word can do any
amount of damage to the runtime stack (value stack).  There is really no
limit, and this is simply due to the fact that the average FORTH
implementation has no control of the amount of the value stack that a
routine can push or pop.  In "real" languages, we have a net-effect
property, which guarantees that the arguments to a function are popped off,
and the return value from a function in put in their place, after function
call.  This makes much of programming much easier, and, most importantly, IS
IN THE LANGUAGE SPECIFICATION.  FORTH programmers may enforce this rule
themseleves, but by golly it sure is nice of the compiler to do it for us C
programmers.  It lets us spend time where we should, worrying about
algorithms and such.


--chet-- (chet at rice.arpa)



More information about the Comp.lang.c mailing list