Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: PUZZLES AND PROBLEMS Message-ID: <1385.UUL1.3#5129@willett.UUCP> Date: 25 Jul 90 03:01:35 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 52 Category 3, Topic 35 Message 128 Mon Jul 23, 1990 W.BADEN1 [Wil] at 21:28 PDT Every language has areas of application in which it is superior, even Basic, Cobol, and Ada. I'm trying to discover just what is Forth's domain of superiority. Obviously it is superior when resources are scarce, or there is an unusual environment. As Marty Fraeman says, "Forth is given us to program one-of-a- kind computers." Then there are unfamiliar environments where Forth's ability to peek, poke, and try lets us find out by trial and error how to hack what we want. There are algorithms envolving many variables and complicated expressions for which Forth offers no advantage. The determination of the date of Easter by 10 quotients and remainders is such, although of course it can be programmed in Forth as any algorithm can be. Local variables make Forth definitions into something like Tiny C with postfix operators. If vector operators are important for an application, Forth is not the best language to program them. Forth in these instances is a dancing dog. Forth may still be appropriate for such applications because of environmental rather than linguistic reasons. Forth may be a good language to program applications using operations for these things defined in another language, e.g., assembler. It is ironic that Forth's name was chosen to suggest it is a fourth generation language. The essence of 4GL's is that they indicate what to do, not how to do it. The essence of Forth is the explicit specification of how to do something. I think that one reason it took so long to get an answer to the permutation problem is that Forth does not lend itself to thinking algebraically. A better name for RPN is "arithmetic notation" as opposed to "algebraic notation." Forth does addition, subtraction, etc., the way we were taught to do when we learned the 3 R's. I know that I solved the permutation problem algebraically and then choreographed my solution into Forth. Forth's muse is Terpsichore, not Calliope -- every participating value must be on the stack in the right place at the right time. Busby Berkeley could have been a great Forth programmer. I'd like to see others' ideas of what the proper domain of Forth is. I'm especially eager to hear from John Wavrik. Procedamus in pace. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or willett!dwp@hobbes.cert.sei.cmu.edu