Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Re: various BASIS10 remarks & suggestions Message-ID: <9003230016.AA16170@jade.berkeley.edu> Date: 22 Mar 90 18:06:26 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb@MITCH.ENG.SUN.COM Organization: The Internet Lines: 69 > 2. ?KEY > Hasn't anyone read Brodie's Thinking Forth ??? > I'd say ?KEY's primary function is to establish if a key is struck, > yes or no. Clearly this reflects a boolean function. I'd suggest KEY? > as the proper name for this function, bearing in mind Brodie's Forthics. There was a bitter argument about this. Most of the committee members appeared to prefer KEY? ( -- flag ), but there were a few who were adamant about having the function return the character if one is available. That cadre basically threatened to shoot down the whole proposal if they didn't get their way (a simple majority is not enough to pass a proposal). The rest of us decided to go along, because we wanted the functionality badly enough to accept the second-best packaging of it. The name was set at ?KEY so that us reasonable folks can then define KEY? to do the right thing. > 4. COMPILE > Can anyone explain to me why a definition of > : COMPILE >R DUP 3 + >R C@ C, ( store the JSR ) @ , ; > wouldn't run on subroutine threaders? (Note: above definition contains several typos, but the intent is nevertheless clear). You can't be sure that the following token has been compiled as a jsr. It might have been expanded in-line or even peephole-optimized. There is little point in using subroutine threading if you are not going to do some in-line machine code expansion. Subroutine threading without some in-line expansion is a lose, both in space and time, on most processors. > 5. ?DO > I'd say TD never has implemented his own DO-LOOP, since during compilation > ?DO's extra adres can be seen by LOOP as just another LEAVE reference and > be solved accordingly. Whether this should be called `smart' is ^2U. > > (Why not let the orig dest duo be sys anyway?) I argued this point rather vehemently at the next-to-last meeting. However, since Wil Baden, the architect of the current control flow scheme, wasn't present, the committee was uncomfortable about acting on it. > 6. INVERT > NOT's renaming because of F79 ad FIG compatibility strikes me as rather > nonconsistent: the 79 NOT comes from an environment where 1 instead of -1 > meant TRUE, so `and' and `or' operators could be implemented by * and + > respectively. The F83 Standard however, discarded of this (inefficient) > concept and made -1 truth, thereby condemning NOT to bitwise operation > as a member of the AND, OR and XOR team. It seems strange for NOT to > adhere to the old valuation-model, especiallly when 0= is available to > achieve the same goal. This is a religious issue about which different people have different strongly-held opinions. The committee argued about this for 2 *years* before finally agreeing on the INVERT compromise. > PS: I've been looking for "'s definition is the F83 standard, but found > none... It's not in the F83 standard, but it is present in several widely-distributed systems. Unfortunately it isn't the same in all systems. F83, F-PC, and MasterForth use it as " ( -- adr len ) while MacForth uses " ( -- adr ) Fortunately, Don Colburn is a very reasonable individual, and he was willing to compromise on this issue. Mitch Bradley