Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucsd!ucbvax!ENG.SUN.COM!Mitch.Bradley From: Mitch.Bradley@ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Forth Style Message-ID: <9105201330.AA15901@ucbvax.Berkeley.EDU> Date: 16 May 91 23:52:57 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch.Bradley%ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 30 > The names should be choosen carefully so that the resulting modules "say" > what they do. Some of this comes from internal naming conventions > (i.e. "/" means initialize, ">" means pointer to..., etc.), but most > comes from imaginitive vocabularies (i.e. a thesaurus). I believe that imaginative names contribute to the "poetic beauty" of Forth code, but often make it the code harder to understand. For instance, consider the word "JOT". JOT is the name of the number conversion buffer in Zen Forth. When I first saw some code with that word in it, I though "that's an amusing word; I wonder what the @#$% it does?". If the word had instead been NUMBER-BUF, I would have known exactly what it does, and I wouldn't have had to spend time looking it up. NUMBER-BUF has no poetic beauty, but any idiot immediately knows exactly what it does. Words which are used a lot should have terse names. Words which are used infrequently should have very-descriptive names. "Cuteness" contributes to Forth's reputation as a difficult-to-read language. The problem with short English words is that they tend to have several meanings, none of which is entirely descriptive of any particular programming language function. Names should indeed be very carefully chosen, but in most cases, precision and clarity is more important than "prettiness". Mitch.Bradley@Eng.Sun.COM