Movement against float.init being nan

zjh fqbqrr at 163.com
Mon Aug 22 01:24:50 UTC 2022


On Sunday, 21 August 2022 at 16:51:51 UTC, Walter Bright wrote:

> 3. compiler complains that `double x;` needs an initializer. To 
> shut up the compiler, the user initializes it to 0, without 
> putting much thought into it. bar(0) may exhibit problems, but 
> these won't necessarily be noticed.
>

In many cases, `0` can solve that problem.
The real problem is that sometimes it is not appropriate to 
initialize with 0.
The compiler should collect these 0 initialization locations to 
better track possible `mistakes`.


More information about the Digitalmars-d mailing list