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,806 of 117,927   
   minforth to Ruvim   
   Re: value-flavoured structures   
   27 Sep 24 08:51:05   
   
   From: minforth@gmx.net   
      
   On Fri, 27 Sep 2024 8:15:48 +0000, Ruvim wrote:   
   > For example, it's impossible to change n to d, n to r, or vice versa,   
   > without changing all the code accessing those fields.   
   >   
   > Similar for the word `to` — `to` applies to the words created with   
   > `value`, `fvalue`, `2value`. But the source code around `to foo` (and   
   > `foo`) depends on the kind of `foo`, so the kind of `foo` cannot be   
   > changed without changing the source code around where it is used.   
   >   
   > Higher level (more polymorphic) source code in Forth is possible when   
   > all values are boxed [1]   
      
   I don't know what compiler you use, but my values and locals   
   are certainly not boxed. TO et al (+TO *TO := *= ++ += *+) will   
   inspect their type and generate the appropriate machine code   
   without me having to change the source code if I change the type.   
      
   --- 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