home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / forth / 3820 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.2 KB

  1. Path: sparky!uunet!gatech!pitt!willett!ForthNet
  2. From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie)
  3. Newsgroups: comp.lang.forth
  4. Subject: Documenting
  5. Message-ID: <4235.UUL1.3#5129@willett.pgh.pa.us>
  6. Date: 11 Jan 93 11:17:36 GMT
  7. Organization: EIEI-U
  8. Lines: 37
  9.  
  10. Category 3,  Topic 3
  11. Message 52        Sun Jan 10, 1993
  12. H.SIMMONS                    at 13:38 EST
  13.  
  14. In response to the mini-flame about Forth code formatting style, I would  like
  15. to suggest that the essence of the question has been missed by most  postings.
  16. The question was why Forth code is often seen without multiple  indents to
  17. show structure.  The answer is that Chuck Moore, FORTH, Inc.,  and many who
  18. follow in their footsteps do not write words that have more  than one control
  19. structure per word.
  20.  
  21. If there are no more than two levels per word, (main and an if-then or a 
  22. loop) then not much indenting is required.  When writing a word with no  more
  23. than 5 to 7 "phrases" and only one control structure, blocks do not  constrain
  24. the programmer.  Text files do not offer much to those who never  use more
  25. than two lines per word anyway.  The PolyForth block index  listing looks very
  26. pretty to those of us who use this style. 
  27.  
  28. The original question was not from a Forth user trying to provoke a flame 
  29. war.  It was from someone experienced in customary languages.  It is as 
  30. though a German or Russian speaker asked why English speakers don't use  the
  31. same phrasing patterns with which he is familiar.  Some of the  responses have
  32. been of the tenor of "those native Forth speakers were  illiterate; when we
  33. better trained (read more intelligent) express our  ideas in Forth, we use the
  34. `correct' phrasing we learned from `C' or  BASIC."
  35.  
  36. Let's agree that many people are used to page-long functions where 
  37. indentation is required for human understanding.  But let's also agree  that
  38. other ways of expressing code need not be condemned until they have  been
  39. tried by fire and been found wanting. 
  40.  
  41.         Horace
  42. -----
  43. This message came from GEnie via willett.  You *cannot* reply to the author
  44. using e-mail.  Please post a follow-up article, or use any instructions
  45. the author may have included (USMail addresses, telephone #, etc.).
  46. Report problems to: dwp@willett.pgh.pa.us
  47.