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,150 of 117,927   
   albert@spenarnc.xs4all.nl to dxforth@gmail.com   
   Re: Locals revisited   
   28 Mar 25 10:38:00   
   
   In article <19029ff0c8e7cf53335fe62639308e7f92d10240@i2pn2.org>,   
   dxf   wrote:   
   >On 27/03/2025 11:02 pm, albert@spenarnc.xs4all.nl wrote:   
   >> In article <87semzmwok.fsf@nightsong.com>,   
   >> Paul Rubin   wrote:   
   >>> albert@spenarnc.xs4all.nl writes:   
   >>>> In hindsight my locals definition is not convincing, because carnal   
   >>>> knowledge about the behaviour of the return stack is required.   
   >>>   
   >>> It's ok if it's for a specific implementation.  But what I'm having   
   >>> trouble seeing is how the locals get popped in case of an exception.   
   >>   
   >>   
   >> I showed it as an example of the pretty convincing usefulness   
   >> of CO. For this the example had to have to be portable.   
   >>   
   >> A simpler example would be   
   >> \ Temporary set  some-rounding-mode  for the duration of this word.   
   >> : rounding set-rounding-mode CO truncate-mode set-rounding-mode ;   
   >> ...   
   >   
   >Actually it was that example which caused me to *not* go ahead   
   >and implement ;: in the kernel despite a cost of only one header.   
   >How many calls to 'rounding' will you encounter in an application?   
      
   `rounding: is an internal word in the fp package and it is used 4   
   times.   
      
   >My guess is one.  The usual example is HEX: but I already had (H.N)   
   >that's more flexible.  For me at least locals was more credible but   
   >again it fell into a range.  For a single use I'd do it manually;   
   >for extensive use (where exceptions etc are likely) a proper locals   
   >may be the only option.  OTOH such decision-making is exactly what   
   >Forth has always been about.   
   >   
   >   
      
   You can't argue with   
       :NONAME ." Before " .S CO ." After " .S ;   
       ' proc_contains_Heisenbug decorated   
      
   Study python for the concept of decoration.   
   This alone makes CO a worthwhile addition.   
      
   I have (D.H) that uses CO. Undoubtedly your (H.N) is more complicated.   
      
   Groetjes Albert   
   --   
   Temu exploits Christians: (Disclaimer, only 10 apostles)   
   Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall   
   Art For Home, Office And Garden Decor - Perfect For Windows, Bars,   
   And Gifts For Friends Family And Colleagues.   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca