Re: named wordlist

Liste des GroupesRevenir à cl forth 
Sujet : Re: named wordlist
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forth
Date : 30. Oct 2024, 13:59:56
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$5ed9835e$5e39672d@d86e74c09230050f>
References : 1
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <vfslvv$20cbt$1@dont-email.me>,
Ruvim  <ruvim.pinka@gmail.com> wrote:
When a word list is created with `vocabulary`, it is associated with a
name, and `order` displays this name in its output.
>
When a word list is created by `wordlist`, it is not associated with a
name. Therefore, `order` typically displays a number for that word list,
which is less informative.
>
A Forth system might try to find a constant whose value is identical to
the wid of such word list and display the name of the constant. Do you
know if this approach is used anywhere?
>
Some Forth systems technically can associate a name with a word list
after the word list is created with `wordlist`. And some even provide an
API for doing so.
>
Do you know of any Forth systems that technically *cannot* associate a
name with a word list created with `wordlist` (due to internal details)?

VOCABULARY didn't make it in the standard because conflicts.
Every sane Forth uses VOCABULARY , or in my case NAMESPACE
because I didn't want to make a choice.
[If you load a program and you get the definition of VOCABULARY
incompatible, and you don't notice it, this means a hard to find
bug]

So every sane Forth normally displays the names of namespaces,
(and not the handles you get form GET-ORDER,)
however they are defined via VOCABULARY or NAMESPACE.

However:
Supposed I abuse the data structure wordlist in a lisp implementation.
They are used with SEARCH-WORDLIST and some such, but if they
happens to be present in the search order, it make no sense to
hunt for a name associated with it.

A typical situation is
WORDLIST CONSTANT my-lisp-whatever

Are you going to inspect all constants?
or worse

_ _ class lisp
  M: lisp-words  ALSO @ CONTEXT ! M;  ( wordlist id commaed in ) ,
  M: .... M;   .
  M: whatever ... M;

endclass

Usage :
17 wordlist lisp  my-lisp

--
Ruvim
>

Groetjes Albert
--
Temu exploits Christians: (Disclaimer, only 10 apostles)
Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
And Gifts For Friends Family And Colleagues.

Date Sujet#  Auteur
30 Oct 24 * named wordlist7Ruvim
30 Oct 24 +* Re: named wordlist3albert
30 Oct 24 i`* Re: named wordlist2Ruvim
1 Nov 24 i `- Re: named wordlist1Ruvim
30 Oct 24 +* Re: named wordlist2Anton Ertl
30 Oct 24 i`- Re: named wordlist1Ruvim
1 Nov 24 `- Re: named wordlist1albert

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal