Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Re: Forth Implementation Message-ID: <9003122241.AA20265@jade.berkeley.edu> Date: 12 Mar 90 17:59:40 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb@MITCH.ENG.SUN.COM Organization: The Internet Lines: 26 > I am about to go thru > and look for places to use COUNT to walk forward thru a sequence of byte > values (instead of DUP 1+ SWAP C@), a practice recently decried by Mitch > Bradley (I think it was). I don't object to having a word to perform this function, but it should be named something else other than COUNT . How about C@+ , or NEXTCHAR , or something like that. It could still be implemented as : C@+ COUNT ; , or if you are worried about speed, either implement it directly in code, duplicating the the implementation of COUNT , or use something like Yngve's SYNONYM facility to create "smart" aliases that either compile or execute their referent as is appropriate. COUNT has a specific purpose - converting a packed string to an "addr len" string. Using it to step through an array just makes Forth harder to read, because the reader looks at it and thinks there must a packed string somewhere. Indeed, the name "count" has negative mnemonic value in this case. "Cleverness" (aha! this just happens to work so I'll use it) at the expense of clarity is one of the things that gives Forth a bad name in the computer community at large. Cheers, Mitch