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