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 116,668 of 117,927   
   Anton Ertl to dxf   
   Re: VALUE and TO implementation   
   07 Aug 24 06:11:03   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   dxf  writes:   
   >On 6/08/2024 2:27 pm, dxf wrote:   
   >> ...   
   >> ISTR dual-xt solutions also have problems with 'edge cases'.   
   >   
   >Works for state-smart but not dual-xt:   
   >   
   >  : ,"  postpone s"  dup c,  here  over allot  swap cmove ;   
   >   
   >  ," Hello world"   
      
   I did not understand at first what this code was supposed to do, in   
   particular why you would want to perform the compilation semantics of   
   S" outside a colon definition.   
      
   After some thinking I found that this code actually relies on a buggy   
   implementation of S" which does not implement the compilation   
   semantics of the standard S" in this usage.  It's better to write code   
   that does not rely on such bugs:   
      
   : ,"  ['] s" execute  dup c,  here  over allot  swap cmove ;   
      
   ," Hello world"   
      
   or just   
      
   : ,"  '"' parse  dup c,  here  over allot  swap cmove ;   
      
   ," Hello world"   
      
   As for the argument that this is supposed to be a problem of correct   
   implementations of S": Yes, one can write code that relies on a bug,   
   for every bug.  That does not justify the bug.   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2024: https://euro.theforth.net   
      
   --- 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