size_t index=-1;
tsbockman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Mar 18 16:35:42 PDT 2016
On Friday, 18 March 2016 at 05:20:35 UTC, Ola Fosheim Grøstaf
wrote:
> Only providing modular arithmetics is a significant language
> design flaw, but as long as all integers are defined to be
> modular then there is no fundamental semantic difference either.
`ulong.max` and `-1L` are fundamentally different semantically,
even with two's complement modular arithmetic.
Just because a few operations (addition and subtraction, mainly)
can use a common implementation for both, does not change that.
Division, for example, cannot be done correctly without knowing
whether the inputs are signed or not.
More information about the Digitalmars-d-learn
mailing list