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