core.checkedint added to druntime
    Walter Bright via Digitalmars-d-announce 
    digitalmars-d-announce at puremagic.com
       
    Tue Jun 17 18:26:22 PDT 2014
    
    
  
https://github.com/D-Programming-Language/druntime/pull/839
While being a very modest piece of code in and of itself, I believe this offers 
a significant opportunity that both D compilers and user defined types can exploit.
Not only can it be used to create an efficient safeint data type, it can be used 
to implement multi-precision integer arithmetic types.
I'd also like to see it used to replace the various ad-hoc schemes currently in 
use. It should also be used in dmd itself for things like detecting array size 
overflows, which is currently done ad-hoc, and detecting overflows in CTFE.
For background information and rationale, see http://blog.regehr.org/archives/1139
    
    
More information about the Digitalmars-d-announce
mailing list