Run Microsoft Analyzer over dmd source code
bearophile
bearophileHUGS at lycos.com
Sun Aug 7 10:43:47 PDT 2011
Walter:
> and there's that cast to float he overlooked, sabotaging his upgrade. Even
> worse, suppose the type of f or d or both is changed to some user defined type,
> like BigFloat? That cast is just going to *cause* a bug, not fix it.
>
> Requiring the programmer to load up on casts is not necessarily making the code
> less "bug-prone".
Thank you for your good explanation.
I presume this doesn't improve the situation a lot:
float f;
double d;
...
f = cast(f.typeof)d;
Bye,
bearophile
More information about the Digitalmars-d
mailing list