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)   
|