Annoyance with new integer promotion deprecations

Martin Nowak code+news.digitalmars at dawg.eu
Sun Feb 18 21:17:38 UTC 2018


On 02/18/2018 08:26 PM, Manu wrote:
> If change the behaviour (is done), then just let the code be broken!
> Emitting these terrible noises, and encouraging people to make their code
> even noisier than the compiler output is much worse than broken code.
> There are hundreds of lines I need to molest to make the compiler shut up.
> I won't type another line of code on my colour library until this noise is
> gone... I will not maintain it. I am emotionally incapable of assaulting my
> code with those casts.

Best solution, write a custom Int type that doesn't use C's horrible
promotion rules.
I've long wanted some SafeInt library that doesn't silently promote and
supports saturation, overflow, and errors.

-Martin


More information about the Digitalmars-d mailing list