home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / forth / 3695 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.7 KB

  1. 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
  2. From: exuhag@exu.ericsson.se (James Hague)
  3. Newsgroups: comp.lang.forth
  4. Subject: Re: Documenting
  5. Message-ID: <1992Dec29.160241.3391@exu.ericsson.se>
  6. Date: 29 Dec 92 16:02:41 GMT
  7. References: <4195.UUL1.3#5129@willett.pgh.pa.us>
  8. Sender: news@exu.ericsson.se
  9. Reply-To: exuhag@exu.ericsson.se
  10. Organization: Ericsson Network Systems, Richardson, TX
  11. Lines: 19
  12. Nntp-Posting-Host: s09a05.exu.ericsson.se
  13. X-Disclaimer: This article was posted by a user at Ericsson.
  14.               Any opinions expressed are strictly those of the
  15.               user and not necessarily those of Ericsson.
  16.  
  17. Take a look at Brodie's _Thinking Forth_ if you can find it, an excellent,
  18. excellent book on Forth style.  Most conventional program layout conventions 
  19. are designed for languages where it is common to stuff a lot of computation 
  20. into a single routine.  In Forth the idea is to have very short definitions,
  21. ideally not more than 7 words (according to Brodie's ideals, anyway).  With 
  22. routines that short, it is actually easier to comprehend if the entire 
  23. definition is on a single line.   If you approach Forth with a C attitude, 
  24. the result is not very pretty.
  25.  
  26. The exception, IMO is when it comes to code words.  I am used to
  27. seeing assembly language programs written with one instruction per
  28. line.  Code words also tend to be longer than their equivalent Forth
  29. definition, so there is too much information to lump together.  Plus
  30. I still have a hard time with postfix assemblers, but that's because
  31. I haven't used them enough...
  32.  
  33. --
  34. James Hague   
  35. exuhag@exu.ericsson.se
  36.