Integer overflow and underflow semantics?
via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 21 12:53:20 PDT 2014
On Monday, 21 July 2014 at 19:33:32 UTC, Artur Skawina via
Digitalmars-d wrote:
> Disallowing integer overflow just at CT is not (sanely) possible
> in a language with D's CTFE capabilities. (Would result in code
> that compiles and works at runtime, but is not ctfe-able)
I'd like to see compile time _constants_ be unbounded rational
numbers with explicit truncation. It is when you assign it to an
in-memory location that you need to worry about bounds. The same
goes for calculations that doesn't do division.
No need to copy the bad parts of C.
More information about the Digitalmars-d
mailing list