home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!west.West.Sun.COM!cronkite.Central.Sun.COM!texsun!exucom.exu.ericsson.se!s09a05!exuhag
- From: exuhag@exu.ericsson.se (James Hague)
- Newsgroups: comp.lang.forth
- Subject: Re: Documenting
- Message-ID: <1992Dec29.160241.3391@exu.ericsson.se>
- Date: 29 Dec 92 16:02:41 GMT
- References: <4195.UUL1.3#5129@willett.pgh.pa.us>
- Sender: news@exu.ericsson.se
- Reply-To: exuhag@exu.ericsson.se
- Organization: Ericsson Network Systems, Richardson, TX
- Lines: 19
- Nntp-Posting-Host: s09a05.exu.ericsson.se
- X-Disclaimer: This article was posted by a user at Ericsson.
- Any opinions expressed are strictly those of the
- user and not necessarily those of Ericsson.
-
- Take a look at Brodie's _Thinking Forth_ if you can find it, an excellent,
- excellent book on Forth style. Most conventional program layout conventions
- are designed for languages where it is common to stuff a lot of computation
- into a single routine. In Forth the idea is to have very short definitions,
- ideally not more than 7 words (according to Brodie's ideals, anyway). With
- routines that short, it is actually easier to comprehend if the entire
- definition is on a single line. If you approach Forth with a C attitude,
- the result is not very pretty.
-
- The exception, IMO is when it comes to code words. I am used to
- seeing assembly language programs written with one instruction per
- line. Code words also tend to be longer than their equivalent Forth
- definition, so there is too much information to lump together. Plus
- I still have a hard time with postfix assemblers, but that's because
- I haven't used them enough...
-
- --
- James Hague
- exuhag@exu.ericsson.se
-