From: anton@mips.complang.tuwien.ac.at   
      
   John Levine writes:   
   >I didn't port a lot of code from the 11 to other machines, but my recollection   
   >is that the widespread assumption in Berkeley Vax code that location zero was   
   >addressable and contained binary zeros was much more painful to fix than   
   >size issues.   
      
   Sure, lots of things are more painful to fix, but Thomas Koenig's   
   claim was that if the 64-bit machines would not run FORTRAN code "as   
   is", nobody would buy them.   
      
   Concerning pain, I found that in Gforth (which contains C code and   
   Forth code) we had many more portability bugs in the C code than in   
   the Forth code, where we had almost no portability bugs.   
      
   That's because Forth has only two integer types: cell (a machine word)   
   and double cell (two machine words); and if you use one instead of the   
   other, the code fails, whatever the cell size is.   
      
   By contrast, in the C code we have to deal with a large number of   
   integer types (not just int, long, etc., but also, e.g., off_t), with   
   the relations between the types being different on different   
   platforms, or, in the case of off_t, also depending #defines. On one   
   machine some function parameter was a long or whatever, on a different   
   one it was a bla_t or whatever. Of course, these days one might   
   target only Linux and MacOS and reach >99% of desktops and servers   
   (the result runs on Windows through WSL2), but that solves the problem   
   by reducing the portability requirements.   
      
   - anton   
   --   
   'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'   
    Mitch Alsup,    
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|