Movement against float.init being nan

Basile B. b2.temp at gmx.com
Fri Aug 19 20:49:42 UTC 2022


On Friday, 19 August 2022 at 18:57:25 UTC, Hipreme wrote:
> On Friday, 19 August 2022 at 16:34:59 UTC, Basile B. wrote:
>> On Friday, 19 August 2022 at 13:42:58 UTC, Hipreme wrote:
>>> [...]
>>
>> It's not a mistake, default initialization in D is not 
>> designed to be an initialization substitute, it's designed in 
>> a way that missing initialization is easily detectable but not 
>> UB. However, thruth is that this only works for character and 
>> floating point types.
>>
>> Changing that design would require a DIP I think.
>
> Well, it **is** used as initialization substitute, if wasn't 
> meant to be a substitute, not initializing a variable should be 
> a compilation error. [...]

I know it is used as substitute but people writing in D should 
keep in mind that
this is not the spirit of default init.


More information about the Digitalmars-d mailing list