core.checkedint added to druntime

Paul D Anderson via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Jul 1 15:06:59 PDT 2014


Will this be in the 2.066 Beta?

On Wednesday, 18 June 2014 at 01:26:16 UTC, Walter Bright wrote:
> 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