Deutsch English Français Italiano |
<20240417211356.581@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.unix.programmer,comp.lang.misc,comp.unix.shell Subject: Re: on Perl Date: Thu, 18 Apr 2024 04:18:48 -0000 (UTC) Organization: A noiseless patient Spider Lines: 30 Message-ID: <20240417211356.581@kylheku.com> References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <0d2cnVzOmbD6f4z7nZ2dnZfqnPudnZ2d@brightview.co.uk> <20240408075547.000061e8@gmail.com> <g52cnWOOwoz_son7nZ2dnZfqnPWdnZ2d@brightview.co.uk> <uvbe3m$2cun7$1@dont-email.me> <Mkidnafag8vlooH7nZ2dnZfqn_idnZ2d@brightview.co.uk> <pan$c8c3e$b0e492b3$c544c27e$d72bff90@invalid.invalid> <uvk8o6$h2pg$3@dont-email.me> <20240415152951.000079ab@gmail.com> <uvkbec$hjeq$1@dont-email.me> <uvlc1f$rgng$1@dont-email.me> <slrnv1smf9.25p4.naddy@lorvorc.mips.inka.de> <uvlp8g$u62e$1@dont-email.me> <87wmowv9fy.fsf@eder.anydns.info> <20240417080523.00005e99@gmail.com> <uvp6gv$1onkq$1@dont-email.me> <20240417121909.000039a3@gmail.com> <uvp996$1p6tk$1@dont-email.me> <20240417133955.00004d23@gmail.com> Injection-Date: Thu, 18 Apr 2024 06:18:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="57a4092e45ca3964de208c71da785f21"; logging-data="2188528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0G1l36LjKosYuc2RQ0wAyEMuGFqbkiVw=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:K2Na5Q1paQt0orDLeh44XpQ8gwY= Bytes: 3073 On 2024-04-17, John Ames <commodorejohn@gmail.com> wrote: > On Wed, 17 Apr 2024 21:52:06 +0200 > David Brown <david.brown@hesbynett.no> wrote: > >> I think that when finding the definition of a word, Forth just >> searches back through the stack of definitions until it gets a hit. >> And if that word definition uses other non-primitive words, it goes >> backwards from where it currently is, looking only at definitions >> from before the current word was defined. Is that right? And if so, >> can you do "forward declarations", and mutual recursion somehow? > > That's my understanding, yes; essentially, it's a consequence of the > fact that definitions are stored as a list of pointers, and re- > definitions are simply appended to the dictionary without going back > through the rest of it to update any pointers to the prior definition. > A strange design choice, but they're consistent with it. I don't know at all whether Forth does this or not, but this design choice allows the list to be restored to a prior state, whereby the recent definitions are forgotten, and the old ones revealed again, similarly to shadowed lexicals being revealed again upon the terminaton of an inner scope. It sounds reminiscent of the assoc list representation of the lexical environment in a rudimentary Lisp interpreter. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca