Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!rutgers!ucsd!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: Re: BASIS 14... comments Message-ID: <9012051503.AA18825@ucbvax.Berkeley.EDU> Date: 4 Dec 90 19:49:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch Bradley Organization: The Internet Lines: 65 The following is a good example of the kinds of disagreement that can occur within the ANS Forth committee. In committee, the disagreement is often not as polite as you will see here :-) The issues are often subtle, and frequently there is no clear "right" answer. > Mitch Bradley writes: > > By the way, now that we have COMPILE, (compile-comma), the words > > POSTPONE , [COMPILE] , and COMPILE are all unnecessary, as the desired > > effects may be achieved with ['] foo EXECUTE and ['] foo COMPILE, > > John Hayes writes: > This is true but the results of such an implementation would be > inefficient on native code systems. The problem is that a postfix > COMPILE, (compile-comma) operator has less information available > to it than a prefix POSTPONE operator. I offer two examples: The validity of the cited examples depends upon the assumption that the implementation cannot correlate the interpretation and compilation behaviors of immediate words. The lack of such correlation could be viewed as a weakness of certain implementation techniques. All implementation techniques have advantages and disadvantages. Even with implementation techniques as described in the examples, it is possible to provide the linkage between compilation and interpretation behaviors. It costs a little memory, but that is just a tradeoff like any other tradeoff. > POSTPONE is used for more often than COMPILE, (compile-comma) and > [COMPILE] in programs. [COMPILE] appears in several previous standards, and in every Forth implementation I have ever used. POSTPONE appears in none of them. I therefore dispute the statement as written. It may well be that, in the post-ANS future, POSTPONE *will be* used far more often than the alternatives, but I don't think that is true in the present tense. > I assert that POSTPONE is the fundamental operator. I disagree, based on the fact that the meaning of a name is ambiguous (it depends on the current search order), whereas the meaning of an execution token is not. Also, I view POSTPONE as being an (admittedly useful) construct built from the primitive functions "lookup" (i.e. FIND ), "compile" (i.e. COMPILE, ), and "execute" (i.e. EXECUTE ). I think the crux of this discussion depends on what one expects from an execution token. In my world view, an execution token (previously known as a CFA) should be a number that identifies a particular word, and from which the system can infer everything that is necessary to known about that word. Another world view sees an execution token as something that you can pass to EXECUTE , no more, no less. I justify my viewpoint based on the aforementioned ambiguity argument. I believe that an unambiguous word identifier should exist, and the execution token is the only currently viable candidate (because that is what FIND returns). Other candidates might be possible, but none have been proposed. Mitch Bradley, wmb@Eng.Sun.COM Brought to you by Super Global Mega Corp .com