Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!brl-smoke!smoke!cottrell@NBS-VMS.ARPA From: cottrell@NBS-VMS.ARPA (COTTRELL, JAMES) Newsgroups: net.lang.c Subject: The heat is on FORTH Message-ID: <1134@brl-smoke.ARPA> Date: Wed, 19-Feb-86 16:23:22 EST Article-I.D.: brl-smok.1134 Posted: Wed Feb 19 16:23:22 1986 Date-Received: Sun, 23-Feb-86 05:53:58 EST Sender: news@brl-smoke.ARPA Lines: 31 /* > 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@rice.arpa) All you're saying is that the Stack is a primitive data type in FORTH & not in C (or Pascal, Fortran, Ada, etc). Your criticism sounds much like saying that since pointers can point anywhere in C that they are dangerous. In fact, FORTH has TWO stacks, one for data & one for procedure (word) calls & DO loops. The call stack is maintained much the same as in conventional languages. I wish I knew who said the following: `Saying that the C language is dangerous presumes the existence of a safe one'. The same goes for FORTH, LISP, FORTRAN, PASCAL, ADA et al. jim cottrell@nbs */ ------