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,670 of 117,927   
   albert@spenarnc.xs4all.nl to ruvim.pinka@gmail.com   
   Re: Alternative for long parsing words   
   07 Aug 24 12:29:13   
   
   In article ,   
   Ruvim   wrote:   
   >On 2024-08-05 18:33, Anton Ertl wrote:   
   >> Ruvim  writes:   
   >>> I meant the word `[IF]` by itself, without connection with `WANT`.   
   >>   
   >> Not necessarily a parsing word.  Could also be treated as something   
   >> like another state (i.e., the text interpreter does the parsing, but   
   >> does something different with the words than interpretation state or   
   >> compile state.   
   >   
   >> In every case, the interaction with other features is   
   >> problematic; e.g., consider:   
   >>   
   >> 0 [IF]   
   >> ...   
   >> \ ....   
   >> \ [ELSE]   
   >> \ ....   
   >> cr .( you should see this according to the standard)   
   >> [THEN]   
   >>   
   >> (and the systems I tested actually comply with the standard requirements)   
   >>   
   >> This behaviour might surprise users, especially in connection with   
   >> nested [IF]s.  However, there have been few complaints, so it   
   >> obviously is only a minor issue.   
   >   
   >   
   >This problem is not endemic to Forth. It takes place in many other   
   >programming languages too.   
   >   
   >For example, in "C++":   
   >   
   >   /*   
   >   
   >     // /* comment */ puts("you should see this");   
   >     // the above command takes effect despite the line comment   
   >   
   >   /* other comment */   
   >   
   >   
   >A rule of thumb: the one who gains control first wins.   
      
   So you cannot read it unless you start parsing from the   
   very beginning.   
   The problem is that it becomes unreadable. Most people   
   who want to comment out sections that contains comment   
   are messy in other respects too. In my coding standards   
   there is the rule, that no nested comments are to be   
   saved in a source control system.   
   All commented out code is questionable. It shows that you   
   don't use your source control system properly.   
      
   In a language like Forth where everything can mean anything   
   it is good to have a comment sign \ that goes until the end   
   of the line.   
   If your editor can't do   
       123,456s/^/\\/   
   or some such, it is simply not powerful enough to serve   
   as a program editor.   
   (I have never used a folding editor, but probably it could   
   be used too.)   
      
   >Ruvim   
      
   Groetjes Albert   
   --   
   Don't praise the day before the evening. One swallow doesn't make spring.   
   You must not say "hey" before you have crossed the bridge. Don't sell the   
   hide of the bear until you shot it. Better one bird in the hand than ten in   
   the air. First gain is a cat purring.            - the Wise from Antrim -   
      
   --- 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