[OT] The Usual Arithmetic Confusions

Paul Backus snarwin at gmail.com
Thu Feb 17 22:49:56 UTC 2022


On Thursday, 17 February 2022 at 22:41:59 UTC, Walter Bright 
wrote:
> On 2/17/2022 12:11 PM, Paul Backus wrote:
>> Yeah, implicit signed-to-unsigned conversion is really nasty. 
>> Even if we keep the rest of the C-style promotion rules, 
>> getting rid of that one would still be a big improvement.
>
> There is a simple solution you can use: never use unsigned 
> integers. I'm not being facetious. Many languages do not have 
> unsigned integer types.

The fact that language built-ins like an array's .length property 
are unsigned make this somewhat difficult to do in D.


More information about the Digitalmars-d mailing list