Movement against float.init being nan

claptrap clap at trap.com
Tue Aug 23 09:00:59 UTC 2022


On Tuesday, 23 August 2022 at 00:50:21 UTC, Walter Bright wrote:
> On 8/20/2022 3:17 PM, Dukc wrote:
>> it goes against what C, C++ and C# (and probably many other 
>> languages) do so one is easily surprised.
>
> C and C++ initialize them to garbage unless it is a 
> global/static variable. That's probably the worst option, as it 
> results in Heisenbugs that are very hard to track down.

Dont most C/C++ compilers have warnings for initialised 
variables? I'm sure MSVC did when I was using it, but its 15 
years ago now.


More information about the Digitalmars-d mailing list