float init 0 request

Peter Jacobs peterj at mech.uq.edu.au
Mon Aug 24 09:39:10 UTC 2026


On Monday, 24 August 2026 at 03:16:29 UTC, Valentino Giudice 
wrote:
> On Friday, 14 August 2026 at 05:57:55 UTC, ABrightLight wrote:
>
> I don't see why all other types are initialized to the most 
> useful value, but floats are initialized to the most useless 
> one.
>

I am going speak against this view and, instead, support Walter's 
take.  I have had four decades of experience with numerical 
calculations and working with reasonably large codes built by 
small groups of people who have various levels of experience (See 
the blog entry 
https://blog.dlang.org/archive/2022/02/02/a-gas-dynamics-toolkit-in-d/ ).  I find that NaN is a particularly useful value for tracking down coding errors, just as Walter describes.



More information about the Digitalmars-d mailing list