float init 0 request

Steven Schveighoffer schveiguy at gmail.com
Fri Aug 14 21:25:56 UTC 2026


On Friday, 14 August 2026 at 05:57:55 UTC, ABrightLight wrote:
> Hello. I understand this subject's been discussed a number of 
> times before, but I'd like to throw in my reasoning for why it 
> would benefit us more for floats to initialize to 0 than NaN.

In all the years I have used D, whenever I have forgotten to 
initialize a floating point number, the fix was ALWAYS to 
initialize explicitly to 0, because that's what I expected and 
desired to happen.

This is a big stain on D, and it disrupts everyone's work 
unnecessarily. The problem is the distance from the error to the 
result.

I don't ever expect it to change.

-Steve


More information about the Digitalmars-d mailing list