home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 117,382 of 117,927   
   minforth to All   
   Re: Nested definitions   
   02 Jul 25 18:34:00   
   
   From: minforth@gmx.net   
      
   Am 02.07.2025 um 17:12 schrieb Anton Ertl:   
   > Ruvim  writes:   
   >> On 2025-07-02 15:37, albert@spenarnc.xs4all.nl wrote:   
   >>> Or it has not even know it, if [ is smart enough to compile a jump to   
   >>> after ].   
   >>   
   >> This can be tricky because the following should work:   
   >>   
   >>    create foo [ 123 , ] [ 456 ,   
   >>   
   >>    : bar  [ ' foo compile, 123 lit, ] ;   
   >   
   > The benefit of defining a normal colon definition inside another colon   
   > definition eludes me, however.  Maybe mutual recursion, but the need   
   > is rare and deferred words handle that well.   
   >   
      
   Many roads lead to Rome. By accident, my quotations have read/write   
   access to the locals of the parent function, but not vice versa.   
      
   Apart from function encapsulation, the benefit is that I don't   
   have to pass all quotation parameters over the stack, which makes   
   the code very straightforward and readable.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca