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,511 of 117,927   
   Ruvim to dxf   
   Re: Stack notation   
   30 May 24 15:08:56   
   
   From: ruvim.pinka@gmail.com   
      
   On 2024-05-30 07:38, dxf wrote:   
   > On 30/05/2024 11:12 am, Ruvim wrote:   
   >> On 2024-05-29 20:46, Anton Ertl wrote:   
   >> ...   
   >>> If two items in the stack effect comment have the same name (such as   
   >>> in this case), they have the same value.  That's also the usage in the   
   >>> standard:   
   >>>   
   >>> | 6.1.1290 DUP dupe CORE   
   >>> | ( x -- x x )   
   >>   
   >>   
   >> But the diagram "( x -- 2*x )" is equivalent to it, isn't it?   
   >   
   > Is it normative.  AFAIK * is used for special circumstances.  You can argue   
   > it's legal but that's just language lawyering.  If it confuses ppl what good   
   > is it.  It's setting a double standard.  How is that new in Forth - you ask.   
   > You got me there :)   
   >   
      
      
   Some people tends to treat stack diagram items as arbitrary names for   
   actual stack parameters (i.e., names for the data objects in the   
   corresponding stack positions), for documentation purposes. They don't   
   pay attention to data types at all, or use the standard data type   
   symbols in the names just as informal hint.   
      
   A corollary of this view is that the same name in two stack diagram   
   items inevitably means that the corresponding stack parameters are   
   identical.   
      
   But it is not a standard stack notation. In the standard stack notation,   
   the names in a stack diagram are data types symbols with optional   
   indices/subscripts, not names for actual stack parameters or data objects.   
      
   And the same data type symbol in two stack diagram items means that the   
   corresponding stack parameters belong to the same data type. And nothing   
   else.   
      
   If you use the standard stack notation, and think this case is   
   confusing, don't use data type symbols without indices if the   
   corresponding stack parameters are always identical. Anyway, it's an   
   informal hint.   
      
   Moreover, if you want to use new data types in your stack diagrams, you   
   should document these data types, their data type symbols and data type   
   relationships.  Otherwise it will be not a standard stack notation.   
      
      
   --   
   Ruvim   
      
   --- 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