Problems with ALSO/ONLY 
Author Message
 Problems with ALSO/ONLY

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.




Tue, 03 Aug 1993 06:46:40 GMT  
 Problems with ALSO/ONLY

Quote:

>Disclaimer: I don't dislike ALSO/ONLY; I use them every day.  But they
>do have some problems:

> [lines deleted]

I found that the Also/Only mechanism is misleading regarding its true actions.
We wound up redefining ALSO so that the words behave more like words on
a stack.  For instance, to put somehting on the return stack is >R , so
logically to put something on the "Vocabulary" stack would be >V.

this is much nicer, as it gives the Forthwright some idea regarding
the vocabulary stack's behavior.  One of the suggestions was to write this
up as a proposal for the ANSI Forth, but none of us have the time.  What
do you think of it?

DY

=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


***  !!xob X*NU V METSYS T&TA eht ni renosirp dleh gnieb m`I  !pleH  !pleH  ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Sat, 21 Aug 1993 00:06:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problems, problems, problems

2. Eiffel Problems, Problems, Problems

3. Finn Idiom problems and Re: {rho} problem

4. Combinatorial Problem [ & a new Combinatorial Problem ]

5. Database problem/Memory problem??

6. CW 2003 - Focus problem & a select problem

7. 32bit problem - one problem solved & another found

8. GForth problem or my problem?

9. REXX DLL problems solved (was Re: Problems getting C subcommand to work)

10. HTTP-Access2 problem (was Ruby Google problem)

11. Problem with this excercise problem.

12. RSX problems and texture problems

 

 
Powered by phpBB® Forum Software