home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / forth / 3712 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.7 KB  |  82 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!starnine!mikeh
  3. From: mikeh@starnine.com (Mike Haas)
  4. Subject: Re: Documenting
  5. Message-ID: <C03sAB.MoB@starnine.com>
  6. Sender: mikeh@starnine.com (Mike Haas)
  7. Date: Thu, 31 Dec 1992 02:58:58 GMT
  8. References: <4195.UUL1.3#5129@willett.pgh.pa.us>
  9. Organization: StarNine Technologies, Inc.
  10. Lines: 70
  11.  
  12. In article <4195.UUL1.3#5129@willett.pgh.pa.us> ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) writes:
  13. >Category 3,  Topic 3
  14. >Message 8         Mon Dec 28, 1992
  15. >ELLIOTT.C                    at 12:26 EST
  16. > ----via CRS Premium Bulletin Board -
  17. >  USR Dual Standard 16.8K  (416) 629-7000
  18. >
  19. > Date: 12-19-92 (13:38)
  20. >   To: ALL
  21. > From: MARK VANDITTA
  22. > Subj: FORTH CODING STYLE
  23. >
  24. > Is it my imagination, or do most Forth programmers lack formal
  25. > instruction in structured coding?  I have found that most Forth
  26. > programmers write code that is even more unlegible than that of C
  27. > programmers raised on DEC Writers.  Why do Forth programmers
  28. > insist on packing so many words on a single line at the sacrifice
  29. > of clarity?
  30.  
  31. > Here's an example from
  32. > Frank Sargent's Pygmy:
  33. >
  34. > CODE 0branch HERE T0BR !
  35. >  AX LODS, DI BX CMP, 0=, IF, AX SI MOV, THEN, BX POP,
  36. >  NXT,   END-CODE
  37. >
  38. > Now I really like what Frank has done with Pygmy, but his coding
  39. > style leaves a lot to be desired.  I had to reformat his code to
  40. > be able to follow its structure.
  41. >
  42. > CODE 0branch
  43. >     HERE T0BR !
  44. >     AX LODS,
  45. >     DI BX CMP,
  46. >     0=, IF,
  47. >         AX SI MOV,
  48. >     THEN,
  49. >     BX POP,
  50. >     NXT,
  51. > END-CODE
  52. >
  53. > Granted, I used 10 lines instead of 3, but it is now clear to me
  54.  
  55. This is a side-effect of those ever-so-limiting 64 x 16 damn SCREENS!
  56.  
  57. In normal file-based environments (which all other languages are
  58. standardized on), you don't have to worry about packing as much
  59. into that tiny space as possible.
  60.  
  61. In otherwords, with SCREENS, there is no way to create pretty,
  62. indented, clear code.  You either have to spread it over
  63. several screens (requiring constant flipping in an editor), or
  64. pack the hell out of each line (to get it all visible in one place).
  65.  
  66. SCREENS only display 16 lines at a time.  More dark ages stuff which
  67. continues to cripple Forth's image.
  68.  
  69. Personally, I'll probably never work with SCREENS again, as I don't
  70. anticipate any more SBC projects.  That's fine with me, as Forth
  71. really does interface well with modern OS's (even some that aren't
  72. so modern), and I'm spoiled by working with standard text files
  73. for about 7 years now.  I can't imagine ever preferring SCREENS...
  74. and I don't care how cool a Forth SCREEN editor you have... there are
  75. much better ones for text files.
  76.  
  77. I hope I never again have to wind my way trough something like...
  78.  
  79. 5 LOAD 8 LOAD 23 LOAD 100 110 THRU 56 LOAD 13 LOAD etc. etc. etc
  80.  
  81.