The solution to "Error handling"...

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Jul 4 10:02:46 UTC 2026


On 04/07/2026 9:51 PM, Guillaume Piolat wrote:
> On Friday, 3 July 2026 at 23:57:05 UTC, H. S. Teoh wrote:
>>
>> As far as D is concerned, defaulting floats to NaN breaks the pattern 
>> of zero-initialization, which sucks.  We should default to 0.0 instead!
> 
> Are we going to read this suggestion over and over for the next years? 
> Because it doesn't make a lot of difference.

Actually it does!

But not for the reason people suggest.

It decreases your binary size, and allows initialization to be done with 
memset instead of memcpy.

So it can increase performance since you won't do reads during 
initialization.



More information about the Digitalmars-d mailing list