Path: utzoo!attcan!uunet!mcvax!ukc!strath-cs!glasgow!orr From: orr@cs.glasgow.ac.uk (Fraser Orr) Newsgroups: comp.lang.forth Subject: Re: Why Forth is good (long) Keywords: stacks, programming glue, functional programming Message-ID: <1610@crete.cs.glasgow.ac.uk> Date: 5 Sep 88 17:52:26 GMT References: <2853@pt.cs.cmu.edu> Reply-To: orr@cs.glasgow.ac.uk (Fraser Orr) Organization: Comp Sci, Glasgow Univ, Scotland Lines: 58 In article <2853@pt.cs.cmu.edu> koopman@a.gp.cs.cmu.edu (Philip Koopman) writes: >We've had a bit of discussion on why Forth is "better" than other >languages. I think I have found a good argument in favor of Forth. > >The reasoning is couched in terms of functional programming, but >the arguments apply equally well to Forth, because they hinge >on implicit parameter passing and the use of a stack. (Functional >programming languages are like Forth in some ways, and some work >has been done implementing functional extensions to Forth.) >I especially like the reference to glueing pieces of programs together. > >The following text is borrowed without permission from: >John Hughes, "Why Functional Programming Matters", I should say that John Hughes is a prof at my department, and I have discussed this kind of thing with him before (although I haven't read the paper you quote). [Stuff about the usefulness of modularity and the importance of glue deleted] >Now let us return to functional programming. We shall argue in the remainder >of this paper that functional languages provide two new, very important >kinds of glue. We shall give many examples of programs that can be modu- >larised in new, exciting ways, and thereby grealy simplified. This is the key >to functional programming's power - it allows greatly improved modularisation. >It is also the goal for which functional programmers must strive - smaller and >simpler and more general modules, glued togehter with the new glues we shall >describe. > I haven't read the paper in question. But if I know John Hughes, the two forms of glue that he will be talking about are lazy evaluation and higher order functions. Neither of these glues are avaliable is forth. Moreover I know of no proper module facilities in forth like languages (although PostScript - a forth like language- has added object oriented features). To suggest that this paper backs up forth as a wonderful programming language is ridiculous. I does quite the opposite. It says that modularity is crucial in large programming projects, this is not avaliable in forth. It says that glue is crucial, the glue avaliable is forth is the worst glue avaliable in just about any programming language there is (because it is untyped, and unsized, and it has very limited facilities for passing complex structures about). The princliples that undergird functional programming are clarity, explicitness, flexibility and type security. Forth bears absolutely no resemblance to any functional programming language I know, (appartfrom the fact that the both run on a computer of course :^>). In answer to David Murry's question (the one he didn't want an answer to) The language that I probably like best is a functional language called Miranda, although I think it is too slow for all practical purposes just now. Regards, ===Fraser