wmb@MITCH.ENG.SUN.COM (10/31/90)
> [ polyForth VOCABULARY is similar to other Forth's VOCABULARY ] in the same > way that fig-Forth VARIABLE is similar to '83 VARIABLE: they > differ only in the presence of a numeric argument. Syntactically that is true, but semantically it is not. The search rules for vocabularies thus created are different. Even among systems with the same syntax (no numeric argument), there are at least three different sets of search semantics that have been used: 1) Vocabularies "chain" to Forth 2) Vocabularies "chain" to the vocabulary in which they were created 3) Vocabularies do not "chain" (run-time search order specification) The semantic difference is sufficient to break code in ways that cannot be fixed with a simple textual "global search and replace". Everybody sort of vaguely agrees on what VOCABULARY does, but when you get down to a precise definition, any precise definition you pick breaks a lot of existing code in subtle ways. WORDSET in Basis is semantically like Forth-83 VOCABULARY . The choice of a different name was intended to allow vendors and users of systems derived from FIG-Forth, Forth-79, polyForth, and MacForth to migrate to an ANS- compliant system with a minimum of grief. "Global search and replace" is considered an acceptable amount of "grief". "Look at every occurrence of a word, and uses of words defined by it, and figure out if it needs to be changed" is considered unacceptable. Of course, it is better not to have to change anything at all, but in some cases (e.g. VOCABULARY ) the divergence of common practice is too great for this to be possible. Mitch