Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!shelby!agate!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Problems with ALSO/ONLY Message-ID: <9102151422.AA01056@ucbvax.Berkeley.EDU> Date: 14 Feb 91 22:46:40 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 32 Disclaimer: I don't dislike ALSO/ONLY; I use them every day. But they do have some problems: 1) There is no standard way to save the existing search order, set the search order to a particular value, and later restore the search order. 2) In the common implementations, it is easy to get in a situation where the same vocabulary is searched twice. This is an implementation problem, not a specification problem, and it's only bad effect is slower compilation, but some people criticise it anyway. 3) A program has no standard way of knowing how many vocabularies it can add to the search order before the search order data structure overflows and the system crashes. 4) Many people think that the behavior of the search order as a "funny stack" (where the execution of a vocabulary *replaces* the top of the stack) is screwy. 5) There is no portable way of testing what is in the search order. 6) There is no portable way of removing a particular vocabulary from the search order. Basically, with ALSO/ONLY as described in Forth 83 (as an experimental wordset), you could set the search order to a particular value, but that is all. Anything else that you wanted to do required knowledge of exactly how it was implemented. I would be interested to hear of other problems that I may have missed. Mitch Bradley, wmb@Eng.Sun.COM