Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Vocabularies Message-ID: <9008101414.AA04429@ucbvax.Berkeley.EDU> Date: 10 Aug 90 02:32:56 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 46 > Doug, what about the ONLY ALSO concept. You can search in just > one vocabulary with SEAL. You can choose the search order with ONLY and > ALSO. You can possibly save the search order with PREVIOUS (fetching > CONTEXT). And it's an proposal for 83 Standard (well, it is in the > description of the 83 Standard I have). ALSO/ONLY is a step in the right direction, but: a) A lot of systems don't implement it. b) There are two different definitions for SEAL - one definition removes all occurrences of the ONLY vocabulary from the search order, and the other definition removes everything except the CONTEXT vocabulary. c) PREVIOUS is not mentioned in the 83 Standard. F83 has it, but that doesn't make it standard. d) Fetching CONTEXT is problematical because you don't know what is in it. In particular, in polyFORTH, the variable CONTEXT contains a *list* of vocabularies, each encoded as 4 bits (I think). Thus, fetching and storing CONTEXT can change more than just the first vocabulary in the search order. The ANS standard addresses these problems as follows: a) by standardizing a search order wordset (Forth 83 just "suggested it" as an experimental proposal. People then took the liberty of twiddling the semantics of SEAL, for instance). b) by changing the name SEAL to ISOLATE and giving it exactly one meaning (which is the same as one of the definitions of SEAL but I forget which) c) by including PREVIOUS in the standard search order wordset. d) by eliminating CONTEXT from the standard (since we eventually determined that there was absolutely nothing that a program can do with it and hope to remain portable; you can still use it if your system has it, but don't fool yourself into thinking such use is portable). Elimination of CONTEXT unfortunately leaves a hole, in that you can't save and restore the search order. Note that the ANS standard didn't create this hole; it was already there because there isn't a portable way to save the search order right now. The committee just hasn't seen fit to fill the existing hole. Mitch