home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

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

   Message 1,432 of 2,753   
   Aleksey Demakov to mailbox@dmitry-kazakov.de   
   Re: My scripting language - any suggesti   
   31 Aug 08 21:04:15   
   
   From: ademakov@gmail.com   
      
   On Sun, Aug 31, 2008 at 4:26 PM, Dmitry A. Kazakov   
    wrote:   
   > In a language with an elaborated types system Integer and Float would have   
   > subtyping relation making explicit conversions unnecessary, for instance   
   > when Integer were a subtype of Float, then it could inherit contravariant   
   > Floor from Float:   
   >   
   >   Floor : Integer -> Float (contravariant in the result)   
      
      
   If Integer is a subtype of Float then how would you deal with the   
   representation of floating point numbers?   
      
   If you use hardware-supported 32-bit representation of floats then   
   there will be a problem with precision.  Some Int values cannot not be   
   precisely represented as floats.   
      
   If you use your own representation of Floats then you will have   
   inefficient floating point ops.   
      
   Regards,   
   Aleksey   
      
   --- 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