Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!hasan From: hasan@ut-emx.uucp (David A. Hasan) Newsgroups: comp.lang.forth Subject: Re: Modular coding style Message-ID: <49361@ut-emx.uucp> Date: 22 May 91 15:54:36 GMT References: <19607@sdcc6.ucsd.edu> Organization: UTexas Center for Space Research Lines: 33 In article <19607@sdcc6.ucsd.edu> ir230@sdcc6.ucsd.edu (john wavrik) writes: >Forth has an undeserved reputation as a "read only" language -- which ^(write-only?) >probably comes from the absence of any accepted conventions for >writing. One of the strong points of Forth is that it does support a >modular style which, if word names are carefully chosen, enhances >readibility (to say nothing of utility) of code. I was originally drawn to Forth because of just this observation. Although it is in fact possible for a competent programmer to write atrocious Forth, a reasonable amount of thought (the sort which ought to precede the coding, anyway) can quite easily lead to *elegant* Forth programs. Brodie's book "Thinking Forth" demonstrates this well. However, all of us eventually (re)use code from other sources (unless everything is done from scratch). In this case, you have to cope with styles and naming conventions that don't necessarily mesh well with your own. The "modules" which you need to search through in order to find reusable code might not fit well with the "modules" which you have dreamed up for your application. Forth style varies so much that it is virtually impossible to construct a large system in one consistent style unless everything is done from scratch. The fact that no simple mechanism exists which allows sets of Forth words (what I believe Brodie called "lexicons") to be cut and pasted between applications contributes to the belief that Forth is in fact Write-Only. -- | David A. Hasan | hasan@emx.utexas.edu