From: no.email@nospam.invalid   
      
   dxf writes:   
   >>> "I remain adamant that local variables are not only useless, they   
   >>> are harmful. If you are writing code that needs them you are   
   >>> writing, non-optimal code" - Chuck Moore 1999 ...   
   >   
   > Claims made in respect of locals in forth - ease of use, better   
   > performance through less 'stack juggling', better   
   > readability/maintainability - were all made in the 1980's. What has   
   > changed? Forthers today are more willing to believe, to accept the   
   > word of authority, lack the interest to discover the truth for   
   > themselves?   
      
   Is avoiding locals because of the Chuck Moore quote not an example of   
   accepting the word of authority? And how often do even you care whether   
   your code is optimal? It's likely difficult to get any interpreted   
   Forth code to run at better than 1/5th the speed of assembly code. So   
   if optimization is your main concern, why use Forth to begin with?   
      
   I would say that the claim of better performance from locals depends on   
   the implementation and in any case has to be scrutinized if it matters,   
   but even if there's a performance loss, that might be an acceptable   
   trade if the programmer finds offsetting gains in the other areas.   
      
   My main programming language for random hacking is Python, which is   
   possibly 10x slower than interpreted Forth or 50x slower than compiled   
   Forth or C. Yet it usually doesn't matter unless I'm trying to do   
   something unusually compute intensive. Once the program is fast enough   
   to not be annoying to use, I don't need to optimize it more.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|