Movement against float.init being nan
Ali Çehreli
acehreli at yahoo.com
Tue Aug 23 15:42:45 UTC 2022
On 8/22/22 07:16, Steven Schveighoffer wrote:
> One thing that everyone seems to be ignoring is that 99% of the time,
> when I find out I didn't initialize a float and it's NaN, it's because I
> didn't correctly initialize it to 0.
Although Walter has already said it on this thread, what is missing in
this picture is, 63% of the time we would not even know we had bugs if D
picked the default value to be 0.0.[1]
I bet I can find bugs related to initialization in 12% of production C++
programs that use floating point variables.
Ali
[1] Yes, I made 63% up.
[2] I made that up as well but I am more confident in that figure. :o)
More information about the Digitalmars-d
mailing list