float init 0 request
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Wed Aug 26 02:57:59 UTC 2026
On 26/08/2026 2:54 PM, Richard (Rikki) Andrew Cattermole wrote:
> On 26/08/2026 4:33 AM, Basile B. wrote:
>> I have followed the topic since the beginning and I see something
>> that's never been noted: an inconsistency is boolean evaluation.
>>
>> ```d
>> void main()
>> {
>> int a;
>> assert(!a); // ok
>> float b;
>> assert(!b); // fails
>> }
>> ```
> You've made a great point.
>
> We should remove truthiness from floats, it doesn't make sense for it to
> support it.
https://github.com/dlang/dmd/issues/23704
More information about the Digitalmars-d
mailing list