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,969 of 2,753   
   Robert A Duff to Gene   
   Re: language design implications for var   
   28 Dec 10 18:22:54   
   
   From: bobduff@shell01.TheWorld.com   
      
   Gene  writes:   
      
   > True.   
      
   Not clear what you're replying to.   
      
   > Much nicer would be   
   >   
   > type Possibly_Valid_Float is new Float with (Unknown);   
      
   OK, but you can't expect existing code that uses Float to   
   work properly with Possibly_Valid_Floats.   
      
   Also, you can't have Possibly_Valid_Floats other than those   
   two possibilities -- it's either a Float or it's not.   
      
   You can do this sort of thing in OCaml.  Type "Maybe(Float)" is either   
   a float or nothing.  It's pretty elegant, and doesn't require any   
   special "enumeration types" or "enumeration type extensions".   
      
   - Bob   
      
   --- 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